@layer reset, base, components, utilities;

@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  html {
    scroll-behavior: smooth;
  }

  body,
  h1,
  h2,
  h3,
  p,
  ul {
    margin: 0;
  }

  img {
    display: block;
    max-width: 100%;
    height: auto;
  }

  button,
  a {
    font: inherit;
  }
}

@layer base {
  :root {
    color-scheme: light;
    --page: #ffffff;
    --surface: #f5f5f7;
    --surface-strong: #e8e8ed;
    --text: #1d1d1f;
    --muted: #6e6e73;
    --line: rgb(29 29 31 / 12%);
    --accent: #0066cc;
    --accent-strong: #004499;
    --accent-soft: #e8f2ff;
    --blue: #0066cc;
    --shadow: 0 24px 60px rgb(0 0 0 / 10%);
    --content: 1120px;
    --reading: 760px;
    --radius-large: 36px;
    --radius-medium: 24px;
  }

  body {
    min-width: 320px;
    min-height: 100vh;
    background: var(--page);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    letter-spacing: -0.012em;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
  }

  body::before {
    position: fixed;
    z-index: -1;
    inset: 0;
    background: var(--page);
    content: "";
    pointer-events: none;
  }

  a {
    color: inherit;
    text-underline-offset: 0.2em;
  }

  a:hover {
    color: var(--accent);
  }

  :focus-visible {
    border-radius: 6px;
    outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
    outline-offset: 4px;
  }

  ::selection {
    background: var(--accent-soft);
  }

  [data-lang="en"] {
    display: none;
  }

  html[data-language="en"] [data-lang="ja"] {
    display: none;
  }

  html[data-language="en"] [data-lang="en"] {
    display: revert;
  }
}

@layer components {
  .skip-link {
    position: fixed;
    z-index: 100;
    top: 12px;
    left: 16px;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--text);
    color: var(--page);
    text-decoration: none;
    transform: translateY(-150%);
    transition: transform 160ms ease;
  }

  .skip-link:focus {
    color: var(--page);
    transform: translateY(0);
  }

  .site-header {
    position: sticky;
    z-index: 20;
    top: 0;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--page) 90%, transparent);
    backdrop-filter: blur(20px) saturate(125%);
    -webkit-backdrop-filter: blur(20px) saturate(125%);
  }

  .nav-shell,
  .section-shell,
  .footer-shell {
    width: min(calc(100% - 40px), var(--content));
    margin-inline: auto;
  }

  .nav-shell {
    display: flex;
    min-height: 64px;
    align-items: center;
    gap: 28px;
  }

  .brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-right: auto;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.03em;
    text-decoration: none;
  }

  .brand img {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }

  .nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 14px;
    font-weight: 600;
  }

  .nav-links a {
    text-decoration: none;
  }

  .language-switcher {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
  }

  .language-button {
    min-width: 42px;
    min-height: 32px;
    padding: 4px 10px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
  }

  .language-button[aria-pressed="true"] {
    background: var(--page);
    color: var(--text);
    box-shadow: 0 1px 5px rgb(20 35 40 / 10%);
  }

  .hero {
    overflow: hidden;
    padding: clamp(76px, 11vw, 150px) 0 clamp(88px, 13vw, 170px);
  }

  .hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1.1fr);
    align-items: center;
    gap: clamp(44px, 8vw, 110px);
  }

  .eyebrow {
    margin-bottom: 18px;
    color: var(--accent);
    font-size: 15px;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .hero h1 {
    max-width: 10ch;
    font-size: clamp(48px, 7.2vw, 86px);
    font-weight: 760;
    line-height: 1.04;
    letter-spacing: -0.065em;
  }

  .hero-title-break {
    display: none;
  }

  .hero-copy {
    max-width: 31rem;
    margin-top: 30px;
    color: var(--muted);
    font-size: clamp(19px, 2vw, 24px);
    line-height: 1.55;
    letter-spacing: -0.025em;
  }

  .hero-note {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
    color: var(--muted);
    font-size: 14px;
  }

  .hero-note::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    content: "";
    box-shadow: 0 0 0 5px var(--accent-soft);
  }

  .hero-visual {
    position: relative;
    min-height: 620px;
  }

  .hero-halo {
    position: absolute;
    inset: 9% 2% 4% 12%;
    border-radius: 50%;
    background: linear-gradient(145deg, #f5f5f7, #edf5ff 72%, #ffffff);
    filter: blur(2px);
  }

  .hero-screen {
    position: absolute;
    z-index: 1;
    right: 2%;
    bottom: 0;
    width: min(74%, 390px);
    border: 1px solid rgb(255 255 255 / 65%);
    border-radius: 42px;
    box-shadow: var(--shadow);
  }

  .app-icon {
    position: absolute;
    z-index: 2;
    top: 7%;
    left: 4%;
    width: clamp(96px, 14vw, 148px);
    border: 1px solid rgb(255 255 255 / 70%);
    border-radius: 24%;
    box-shadow: 0 18px 42px rgb(0 0 0 / 14%);
  }

  .feature-section {
    border-top: 1px solid var(--line);
    padding: clamp(88px, 12vw, 160px) 0;
  }

  .feature-section:nth-of-type(even) {
    background: var(--page);
  }

  .section-heading {
    max-width: 760px;
    margin-bottom: clamp(52px, 8vw, 92px);
  }

  .section-heading h2,
  .privacy-intro h1 {
    font-size: clamp(38px, 5.5vw, 64px);
    font-weight: 740;
    line-height: 1.08;
    letter-spacing: -0.055em;
  }

  .section-heading p {
    max-width: 650px;
    margin-top: 22px;
    color: var(--muted);
    font-size: clamp(18px, 2vw, 22px);
  }

  .feature-row {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(320px, 1.18fr);
    align-items: center;
    gap: clamp(48px, 9vw, 120px);
  }

  .feature-row + .feature-row {
    margin-top: clamp(100px, 14vw, 180px);
  }

  .feature-row.reverse .feature-copy {
    order: 2;
  }

  .feature-row.reverse .device-stage {
    order: 1;
  }

  .feature-copy h3 {
    max-width: 12ch;
    font-size: clamp(32px, 4.3vw, 52px);
    font-weight: 720;
    line-height: 1.12;
    letter-spacing: -0.05em;
  }

  .feature-copy p {
    max-width: 31rem;
    margin-top: 22px;
    color: var(--muted);
    font-size: 18px;
  }

  .feature-points {
    display: grid;
    gap: 13px;
    margin-top: 28px;
    padding: 0;
    list-style: none;
  }

  .feature-points li {
    position: relative;
    padding-left: 24px;
  }

  .feature-points li::before {
    position: absolute;
    top: 0.65em;
    left: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    content: "";
  }

  .device-stage,
  .device-stage.blue,
  .device-stage.warm {
    display: grid;
    min-height: 660px;
    place-items: center;
    padding: clamp(34px, 6vw, 70px);
    border: 1px solid var(--line);
    border-radius: var(--radius-large);
    background: linear-gradient(145deg, #f5f5f7, #fafafa 68%, var(--page));
    overflow: hidden;
  }

  .device-stage img {
    width: min(100%, 360px);
    border-radius: 38px;
    box-shadow: var(--shadow);
  }

  .values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }

  .value-card {
    min-height: 250px;
    padding: clamp(28px, 4vw, 42px);
    border: 1px solid var(--line);
    border-radius: var(--radius-medium);
    background: var(--page);
    box-shadow: 0 10px 30px rgb(0 0 0 / 4%);
  }

  .value-mark {
    display: grid;
    width: 48px;
    height: 48px;
    margin-bottom: 42px;
    place-items: center;
    border-radius: 15px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 21px;
    font-weight: 800;
  }

  .value-card h3 {
    font-size: 23px;
    line-height: 1.2;
    letter-spacing: -0.035em;
  }

  .value-card p {
    margin-top: 12px;
    color: var(--muted);
    font-size: 15px;
  }

  .operator-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: clamp(36px, 6vw, 68px);
    border: 1px solid var(--line);
    border-radius: var(--radius-large);
    background: var(--surface);
    color: var(--text);
  }

  .operator-card h2 {
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.15;
    letter-spacing: -0.045em;
    overflow-wrap: anywhere;
  }

  .operator-card p {
    margin-top: 14px;
    color: var(--muted);
  }

  .text-link {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
  }

  .text-link::after {
    content: "→";
    transition: transform 160ms ease;
  }

  .text-link:hover::after {
    transform: translateX(4px);
  }

  .privacy-cta {
    margin-top: 28px;
  }

  .operator-card .text-link {
    flex: 0 0 auto;
    padding: 11px 19px;
    border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
    border-radius: 999px;
    background: var(--page);
    color: var(--accent);
  }

  .site-footer {
    padding: 32px 0 42px;
    border-top: 1px solid var(--line);
  }

  .footer-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    color: var(--muted);
    font-size: 13px;
  }

  .footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
  }

  .privacy-main {
    padding: clamp(72px, 10vw, 130px) 0 clamp(100px, 14vw, 170px);
  }

  .privacy-intro,
  .policy-content {
    width: min(calc(100% - 40px), var(--reading));
    margin-inline: auto;
  }

  .privacy-intro {
    padding-bottom: clamp(54px, 8vw, 86px);
    border-bottom: 1px solid var(--line);
  }

  .privacy-intro h1 {
    max-width: 12ch;
  }

  .privacy-intro p {
    margin-top: 24px;
    color: var(--muted);
    font-size: 18px;
  }

  .policy-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin-top: 26px;
    color: var(--muted);
    font-size: 14px;
  }

  .policy-content {
    padding-top: clamp(54px, 8vw, 86px);
  }

  .policy-content section + section {
    margin-top: 58px;
  }

  .policy-content h2 {
    font-size: clamp(25px, 3vw, 32px);
    line-height: 1.25;
    letter-spacing: -0.035em;
  }

  .policy-content p,
  .policy-content ul {
    margin-top: 17px;
    color: var(--muted);
  }

  .policy-content ul {
    padding-left: 1.35em;
  }

  .policy-content li + li {
    margin-top: 8px;
  }

  .contact-box {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-medium);
    background: var(--surface);
  }
}

@layer utilities {
  .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
    margin: -1px;
    clip: rect(0 0 0 0);
    overflow: hidden;
    white-space: nowrap;
  }
}

@media (max-width: 820px) {
  .nav-links a:not(.privacy-nav-link) {
    display: none;
  }

  .hero {
    padding: clamp(64px, 10vw, 92px) 0 clamp(80px, 12vw, 112px);
  }

  .hero-layout,
  .feature-row {
    grid-template-columns: 1fr;
  }

  .hero-layout {
    gap: clamp(56px, 9vw, 76px);
  }

  .hero-visual {
    display: grid;
    min-height: 0;
    isolation: isolate;
    place-items: end;
  }

  .hero-screen {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(72%, 360px);
    margin-left: auto;
  }

  .app-icon {
    top: 12%;
    left: 2%;
    width: clamp(96px, 16vw, 128px);
  }

  .feature-row.reverse .feature-copy,
  .feature-row.reverse .device-stage {
    order: initial;
  }

  .feature-copy h3 {
    max-width: 16ch;
  }

  .device-stage {
    min-height: 590px;
  }

  .values-grid {
    grid-template-columns: 1fr;
  }

  .value-card {
    min-height: auto;
  }

  .value-mark {
    margin-bottom: 28px;
  }

  .operator-card {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .nav-shell,
  .section-shell,
  .footer-shell {
    width: min(calc(100% - 28px), var(--content));
  }

  .nav-shell {
    gap: 14px;
  }

  .nav-links {
    gap: 12px;
  }

  .privacy-nav-link {
    display: none;
  }

  .hero {
    padding: 56px 0 76px;
  }

  .hero-layout {
    gap: 52px;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(42px, 12vw, 50px);
  }

  .hero-title-break {
    display: block;
  }

  .hero-copy {
    margin-top: 24px;
    font-size: 18px;
    line-height: 1.55;
  }

  .hero-note {
    margin-top: 24px;
  }

  .hero-visual {
    padding-top: 18px;
  }

  .app-icon {
    top: 12%;
    left: 0;
    width: clamp(76px, 22vw, 92px);
  }

  .hero-screen {
    width: min(78%, 320px);
    border-radius: 32px;
  }

  .device-stage {
    min-height: 500px;
    padding: 32px 24px;
    border-radius: 28px;
  }

  .device-stage img {
    border-radius: 30px;
  }

  .footer-shell {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: currentColor;
  }

  .language-switcher,
  .value-card,
  .device-stage,
  .contact-box {
    border-width: 2px;
  }
}
