/* ═══════════════════════════════════════════════════════════════
   Freevate Type4 — "Japanese Modern Gateway"
   Single-page corporate site with SVG animation & trust-first design
   ═══════════════════════════════════════════════════════════════ */

/* ── Layers ── */
@layer reset, base, tokens, layout, components, sections, utilities, animations;

/* ── Design Tokens ── */
@layer tokens {
  :root {
    /* Brand Colors — oklch + fallback */
    --fv-logo: #03572f;
    --fv-logo-oklch: oklch(0.35 0.10 155);
    --fv-primary: #1B365D;
    --fv-primary-oklch: oklch(0.28 0.06 260);
    --fv-primary-light: #2A4A7F;
    --fv-primary-dark: #0D1F3C;
    --fv-accent: #C4973B;
    --fv-accent-hover: #A67D2E;
    --fv-accent-light: #F5ECD7;

    /* Green Scale */
    --fv-green-900: #02401f;
    --fv-green-700: #03572f;
    --fv-green-500: #0a7b42;
    --fv-green-300: #4CAF7D;
    --fv-green-100: #E8F5EE;

    /* Neutrals */
    --fv-bg: #FAFBFC;
    --fv-bg-warm: #F7F5F0;
    --fv-bg-dark: #0D1F3C;
    --fv-bg-deeper: #08132A;
    --fv-text: #1A1A2E;
    --fv-text-sub: #5A6178;
    --fv-text-inverse: #FFFFFF;
    --fv-text-warm: #3D3228;
    --fv-border: #E2E4E8;
    --fv-border-light: #F0F1F3;

    /* Overlays */
    --fv-overlay-glass: rgba(255, 255, 255, 0.72);
    --fv-overlay-dark: rgba(13, 31, 60, 0.92);

    /* Shadows */
    --fv-shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --fv-shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
    --fv-shadow-lg: 0 12px 48px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
    --fv-shadow-xl: 0 24px 64px rgba(0,0,0,0.16), 0 8px 24px rgba(0,0,0,0.08);
    --fv-shadow-glow: 0 0 40px rgba(3, 87, 47, 0.15);

    /* Spacing — 4px grid */
    --sp-1: 0.25rem;
    --sp-2: 0.5rem;
    --sp-3: 0.75rem;
    --sp-4: 1rem;
    --sp-5: 1.25rem;
    --sp-6: 1.5rem;
    --sp-8: 2rem;
    --sp-10: 2.5rem;
    --sp-12: 3rem;
    --sp-16: 4rem;
    --sp-20: 5rem;
    --sp-24: 6rem;
    --sp-32: 8rem;

    /* Radius */
    --r-sm: 4px;
    --r-md: 8px;
    --r-lg: 12px;
    --r-xl: 16px;
    --r-2xl: 24px;
    --r-full: 9999px;

    /* Typography */
    --font-display: 'Sora', 'Noto Sans JP', sans-serif;
    --font-body-en: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body-ja: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

    /* Fluid type — Major Third 1.25 */
    --text-xs: clamp(0.64rem, 0.58rem + 0.3vw, 0.8rem);
    --text-sm: clamp(0.8rem, 0.72rem + 0.4vw, 1rem);
    --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
    --text-lg: clamp(1.25rem, 1.12rem + 0.65vw, 1.563rem);
    --text-xl: clamp(1.563rem, 1.4rem + 0.81vw, 1.953rem);
    --text-2xl: clamp(1.953rem, 1.75rem + 1.01vw, 2.441rem);
    --text-3xl: clamp(2.441rem, 2.19rem + 1.26vw, 3.052rem);
    --text-hero: clamp(2.4rem, 1.9rem + 2.5vw, 3.2rem);
    --text-hero-ja: clamp(2rem, 1.6rem + 2vw, 2.8rem);

    /* Line heights */
    --leading-tight: 1.1;
    --leading-snug: 1.3;
    --leading-normal: 1.6;
    --leading-relaxed: 1.8;

    /* Timing */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --dur-fast: 150ms;
    --dur-base: 300ms;
    --dur-slow: 500ms;
    --dur-slower: 800ms;
    --dur-anim: 1200ms;

    /* Z-index */
    --z-base: 1;
    --z-sticky: 100;
    --z-overlay: 300;
    --z-modal: 400;

    /* Layout */
    --content-max: 1280px;
    --content-narrow: 768px;
    --content-wide: 1440px;
    --gutter: clamp(1rem, 0.5rem + 2.5vw, 2rem);
  }
}

/* ── Reset ── */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; }
  body { min-height: 100dvh; }
  img, video { display: block; max-width: 100%; }
  svg { max-width: 100%; }
  img { height: auto; }
  a { color: inherit; text-decoration: none; }
  button { font: inherit; cursor: pointer; border: none; background: none; }
  ul, ol { list-style: none; }
  input, textarea, select { font: inherit; }
  h1, h2, h3, h4, h5, h6 { text-wrap: balance; }
  p { text-wrap: pretty; }
}

/* ── Base ── */
@layer base {
  @font-face {
    font-family: 'Noto Sans JP';
    src: url('../assets/fonts/noto-sans-jp-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
  }
  @font-face {
    font-family: 'Noto Sans JP';
    src: url('../assets/fonts/noto-sans-jp-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
  }

  body {
    font-family: var(--font-body-en);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--fv-text);
    background: var(--fv-bg);
    overflow-x: hidden;
  }

  :lang(ja) body {
    font-family: var(--font-body-ja);
  }

  ::selection {
    background: rgba(3, 87, 47, 0.15);
    color: var(--fv-green-900);
  }

  :focus-visible {
    outline: 2px solid var(--fv-accent);
    outline-offset: 3px;
    border-radius: var(--r-sm);
  }
}

/* ── Layout ── */
@layer layout {
  .fv-container {
    width: 100%;
    max-width: var(--content-max);
    margin-inline: auto;
    padding-inline: var(--gutter);
  }
  .fv-container--narrow { max-width: var(--content-narrow); }
  .fv-container--wide { max-width: var(--content-wide); }
  .fv-section {
    padding-block: var(--sp-20);
    position: relative;
    overflow: hidden;
  }
  @media (min-width: 768px) {
    .fv-section { padding-block: var(--sp-32); }
  }
}

/* ── Components ── */
@layer components {

  /* ─ Skip Link ─ */
  .fv-skip-link {
    position: absolute;
    top: -100%;
    left: var(--sp-4);
    padding: var(--sp-2) var(--sp-4);
    background: var(--fv-primary);
    color: var(--fv-text-inverse);
    border-radius: var(--r-md);
    z-index: calc(var(--z-modal) + 1);
    font-size: var(--text-sm);
    font-weight: 600;
  }
  .fv-skip-link:focus { top: var(--sp-4); }

  /* ─ Header ─ */
  .fv-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky);
    background: transparent;
    transition: background var(--dur-base) var(--ease-out),
                box-shadow var(--dur-base) var(--ease-out),
                backdrop-filter var(--dur-base) var(--ease-out);
  }
  .fv-header.is-scrolled {
    background: var(--fv-overlay-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--fv-shadow-sm);
  }
  /* backdrop-filter creates a containing block that clips the fullscreen nav overlay,
     so disable it while the mobile menu is open. */
  .fv-header.is-menu-open {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: transparent;
    box-shadow: none;
  }
  .fv-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    max-width: var(--content-wide);
    margin-inline: auto;
    padding-inline: var(--gutter);
    transition: height var(--dur-base) var(--ease-out);
  }
  .fv-header.is-scrolled .fv-header__inner { height: 64px; }

  .fv-header__logo-link {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
  }
  .fv-header__logo {
    display: block;
    height: 44px;
    width: auto;
    transition: height var(--dur-base) var(--ease-out), filter var(--dur-base) var(--ease-out);
  }
  .fv-header:not(.is-scrolled) .fv-header__logo {
    filter: brightness(0) invert(1);
  }
  .fv-header.is-scrolled .fv-header__logo { height: 36px; }

  .fv-header__nav {
    display: flex;
    align-items: center;
    gap: var(--sp-8);
  }
  .fv-header__nav-link {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--fv-text-inverse);
    text-decoration: none;
    padding-block: var(--sp-2);
    position: relative;
    transition: color var(--dur-fast) var(--ease-out);
  }
  .fv-header.is-scrolled .fv-header__nav-link { color: var(--fv-text); }
  .fv-header__nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--fv-accent);
    border-radius: var(--r-full);
    transition: width var(--dur-base) var(--ease-out);
  }
  .fv-header__nav-link:hover::after { width: 100%; }

  :lang(ja) .fv-header__nav-link { font-family: var(--font-body-ja); }

  .fv-header__lang {
    display: flex;
    align-items: center;
    gap: var(--sp-1);
    padding: var(--sp-1) var(--sp-3);
    border: 1.5px solid rgba(255,255,255,0.4);
    border-radius: var(--r-full);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--fv-text-inverse);
    transition: border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
  }
  .fv-header.is-scrolled .fv-header__lang {
    border-color: var(--fv-border);
    color: var(--fv-text);
  }
  .fv-header__lang:hover {
    border-color: var(--fv-accent);
    color: var(--fv-accent);
  }

  .fv-header__menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: var(--fv-text-inverse);
    z-index: calc(var(--z-overlay) + 1);
  }
  .fv-header.is-scrolled .fv-header__menu-btn { color: var(--fv-text); }
  .fv-header__menu-btn svg { width: 24px; height: 24px; }

  @media (max-width: 767px) {
    .fv-header__nav {
      display: none;
      position: fixed;
      inset: 0;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      gap: var(--sp-10);
      background: var(--fv-overlay-dark);
      z-index: var(--z-overlay);
    }
    .fv-header__nav.is-open { display: flex; }
    .fv-header__nav.is-open .fv-header__nav-link {
      color: var(--fv-text-inverse);
      font-size: var(--text-xl);
    }
    .fv-header__nav.is-open .fv-header__lang {
      border-color: rgba(255,255,255,0.4);
      color: var(--fv-text-inverse);
    }
    .fv-header__menu-btn { display: flex; }
  }

  /* ─ Section Title ─ */
  .fv-section-title {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    line-height: var(--leading-tight);
    color: var(--fv-text);
    position: relative;
    padding-top: var(--sp-4);
  }
  .fv-section-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 48px;
    height: 3px;
    background: var(--fv-accent);
    border-radius: var(--r-full);
  }
  .fv-section-title--center { text-align: center; }
  .fv-section-title--center::before { left: 50%; transform: translateX(-50%); }
  .fv-section-title--light { color: var(--fv-text-inverse); }
  .fv-section-title--no-bar::before { display: none; }

  :lang(ja) .fv-section-title { font-family: var(--font-body-ja); }

  .fv-section-subtitle {
    font-size: var(--text-base);
    color: var(--fv-text-sub);
    line-height: var(--leading-normal);
    max-width: 640px;
    margin-top: var(--sp-3);
  }
  .fv-section-subtitle--center { text-align: center; margin-inline: auto; }
  .fv-section-subtitle--light { color: rgba(255,255,255,0.7); }

  /* ─ Buttons ─ */
  .fv-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-8);
    min-height: 52px;
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: 700;
    border-radius: var(--r-lg);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all var(--dur-base) var(--ease-out);
    white-space: nowrap;
  }
  :lang(ja) .fv-btn { font-family: var(--font-body-ja); }

  .fv-btn--primary {
    color: var(--fv-text-inverse);
    background: var(--fv-accent);
    border: 2px solid var(--fv-accent);
  }
  .fv-btn--primary:hover {
    background: var(--fv-accent-hover);
    border-color: var(--fv-accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--fv-shadow-md);
  }
  .fv-btn--primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left var(--dur-slow) var(--ease-out);
  }
  .fv-btn--primary:hover::after { left: 100%; }

  .fv-btn--outline {
    color: var(--fv-primary);
    background: transparent;
    border: 2px solid var(--fv-primary);
  }
  .fv-btn--outline:hover {
    background: var(--fv-primary);
    color: var(--fv-text-inverse);
    transform: translateY(-2px);
  }

  .fv-btn--outline-light {
    color: var(--fv-text-inverse);
    background: transparent;
    border: 2px solid rgba(255,255,255,0.4);
  }
  .fv-btn--outline-light:hover {
    background: var(--fv-text-inverse);
    color: var(--fv-primary);
    border-color: var(--fv-text-inverse);
    transform: translateY(-2px);
  }

  .fv-btn__arrow {
    display: inline-block;
    transition: transform var(--dur-base) var(--ease-spring);
  }
  .fv-btn:hover .fv-btn__arrow { transform: translateX(4px); }

  .fv-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-4);
  }
  @media (max-width: 480px) {
    .fv-btn-group { flex-direction: column; }
    .fv-btn-group .fv-btn { justify-content: center; }
  }

  /* ─ Trust Badge ─ */
  .fv-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
    justify-content: center;
  }
  .fv-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-2) var(--sp-4);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--r-full);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--fv-text-inverse);
    white-space: nowrap;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  .fv-badge--light {
    background: rgba(3, 87, 47, 0.06);
    border-color: rgba(3, 87, 47, 0.12);
    color: var(--fv-green-700);
  }
  .fv-badge__icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }

  /* ─ Card ─ */
  .fv-card {
    background: var(--fv-bg);
    border-radius: var(--r-xl);
    border: 1px solid var(--fv-border-light);
    padding: var(--sp-8);
    transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
  }
  .fv-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--fv-shadow-lg);
  }
  .fv-card__icon {
    display: block;
    width: 56px;
    height: 56px;
    margin-bottom: var(--sp-5);
    color: var(--fv-logo);
  }
  .fv-card__title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--fv-text);
    margin-bottom: var(--sp-3);
  }
  :lang(ja) .fv-card__title { font-family: var(--font-body-ja); }
  .fv-card__desc {
    font-size: var(--text-sm);
    color: var(--fv-text-sub);
    line-height: var(--leading-normal);
  }

  /* ─ Review Card ─ */
  .fv-review {
    flex-shrink: 0;
    width: min(420px, 85vw);
    padding: var(--sp-8);
    background: var(--fv-bg);
    border-radius: var(--r-xl);
    border: 1px solid var(--fv-border-light);
    box-shadow: var(--fv-shadow-sm);
  }
  .fv-review__stars {
    display: flex;
    gap: 2px;
    color: var(--fv-accent);
    font-size: 1.2rem;
    margin-bottom: var(--sp-4);
  }
  .fv-review__text {
    font-size: var(--text-base);
    font-style: italic;
    line-height: var(--leading-normal);
    color: var(--fv-text);
    margin-bottom: var(--sp-4);
  }
  .fv-review__author {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: var(--text-sm);
    color: var(--fv-text-sub);
  }

  /* ─ Timeline ─ */
  .fv-timeline {
    position: relative;
    padding-left: var(--sp-10);
  }
  .fv-timeline::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(to bottom, var(--fv-accent), var(--fv-green-300));
    border-radius: var(--r-full);
  }
  .fv-timeline__item {
    position: relative;
    padding-bottom: var(--sp-10);
  }
  .fv-timeline__item:last-child { padding-bottom: 0; }
  .fv-timeline__item::before {
    content: '';
    position: absolute;
    left: calc(-1 * var(--sp-10) + 6px);
    top: 6px;
    width: 14px;
    height: 14px;
    background: var(--fv-bg);
    border: 3px solid var(--fv-accent);
    border-radius: var(--r-full);
    z-index: 1;
  }
  .fv-timeline__year {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--fv-accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: var(--sp-1);
  }
  .fv-timeline__title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--fv-text);
    margin-bottom: var(--sp-2);
  }
  :lang(ja) .fv-timeline__title { font-family: var(--font-body-ja); }
  .fv-timeline__desc {
    font-size: var(--text-sm);
    color: var(--fv-text-sub);
    line-height: var(--leading-normal);
  }

  /* ─ Stats ─ */
  .fv-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--sp-8);
    text-align: center;
  }
  .fv-stat__number {
    font-family: var(--font-mono);
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--fv-accent);
    line-height: 1;
    margin-bottom: var(--sp-2);
  }
  .fv-stat__label {
    font-size: var(--text-sm);
    color: var(--fv-text-sub);
    font-weight: 500;
  }

  /* ─ Company Info Table ─ */
  .fv-info-table {
    width: 100%;
    border-collapse: collapse;
  }
  .fv-info-table th,
  .fv-info-table td {
    padding: var(--sp-4) var(--sp-6);
    text-align: left;
    font-size: var(--text-sm);
    border-bottom: 1px solid var(--fv-border);
  }
  .fv-info-table th {
    width: 30%;
    font-weight: 700;
    color: var(--fv-text);
    background: var(--fv-bg-warm);
    white-space: nowrap;
  }
  .fv-info-table td {
    color: var(--fv-text-sub);
  }
  @media (max-width: 600px) {
    .fv-info-table th,
    .fv-info-table td {
      display: block;
      width: 100%;
      padding: var(--sp-3) var(--sp-4);
    }
    .fv-info-table th { border-bottom: none; padding-bottom: 0; }
  }

  /* ─ Footer ─ */
  .fv-footer {
    background: linear-gradient(175deg, var(--fv-bg-dark) 0%, var(--fv-green-900) 40%, #012e18 100%);
    color: var(--fv-text-inverse);
    padding-block: var(--sp-16) var(--sp-8);
    position: relative;
    overflow: hidden;
  }
  .fv-footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
      radial-gradient(circle at 30% 40%, rgba(196, 151, 59, 0.08) 0%, transparent 50%),
      radial-gradient(circle at 70% 60%, rgba(3, 87, 47, 0.1) 0%, transparent 40%);
    pointer-events: none;
  }
  .fv-footer::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    pointer-events: none;
  }
  .fv-footer > .fv-container { position: relative; z-index: 1; }
  .fv-footer__top {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: var(--sp-8);
    margin-bottom: var(--sp-12);
  }
  @media (max-width: 767px) {
    .fv-footer__top { grid-template-columns: 1fr 1fr; gap: var(--sp-6); }
  }
  .fv-footer__logo {
    display: block;
    height: 120px;
    width: auto;
    filter: brightness(0) invert(1);
    margin-bottom: var(--sp-4);
  }
  .fv-footer__desc {
    font-size: var(--text-sm);
    color: rgba(255,255,255,0.65);
    line-height: var(--leading-normal);
  }
  .fv-footer__col-title {
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.5);
    margin-bottom: var(--sp-4);
  }
  .fv-footer__link {
    display: block;
    font-size: var(--text-sm);
    color: rgba(255,255,255,0.8);
    padding-block: var(--sp-1);
    transition: color var(--dur-fast) var(--ease-out);
  }
  .fv-footer__link:hover { color: var(--fv-text-inverse); }
  .fv-footer__license {
    font-size: var(--text-xs);
    color: rgba(255,255,255,0.4);
    margin-bottom: var(--sp-4);
  }
  .fv-footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: var(--sp-6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--text-xs);
    color: rgba(255,255,255,0.4);
  }
  @media (max-width: 480px) {
    .fv-footer__bottom { flex-direction: column; gap: var(--sp-2); }
  }
}

/* ── Sections ── */
@layer sections {

  /* Section backgrounds */
  .fv-section--warm { background: var(--fv-bg-warm); }
  .fv-section--dark {
    background: linear-gradient(175deg, var(--fv-bg-dark) 0%, var(--fv-bg-deeper) 100%);
    color: var(--fv-text-inverse);
  }
  .fv-section--mesh {
    background:
      radial-gradient(ellipse at 20% 50%, rgba(3, 87, 47, 0.05) 0%, transparent 60%),
      radial-gradient(ellipse at 80% 20%, rgba(196, 151, 59, 0.04) 0%, transparent 50%),
      radial-gradient(ellipse at 50% 80%, rgba(27, 54, 93, 0.04) 0%, transparent 60%),
      var(--fv-bg);
  }
  .fv-section--green {
    background: linear-gradient(175deg, var(--fv-green-900) 0%, #012e18 100%);
    color: var(--fv-text-inverse);
  }

  /* ─ Hero Section ─ */
  .fv-hero {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    background: linear-gradient(175deg, var(--fv-bg-dark) 0%, var(--fv-green-900) 40%, #012e18 100%);
    color: var(--fv-text-inverse);
    overflow: hidden;
  }
  .fv-hero__bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
  }
  .fv-hero__bg-pattern {
    position: absolute;
    inset: 0;
    background-image:
      radial-gradient(circle at 30% 40%, rgba(196, 151, 59, 0.08) 0%, transparent 50%),
      radial-gradient(circle at 70% 60%, rgba(3, 87, 47, 0.1) 0%, transparent 40%);
    animation: fv-bg-drift 30s ease-in-out infinite alternate;
  }
  .fv-hero__noise {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 256px;
    mix-blend-mode: overlay;
  }
  .fv-hero__grid-lines {
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  }
  .fv-hero__content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-12);
    align-items: center;
  }
  @media (max-width: 900px) {
    .fv-hero__content {
      grid-template-columns: 1fr;
      text-align: center;
    }
  }
  .fv-hero__text { max-width: 600px; }
  @media (max-width: 900px) { .fv-hero__text { margin-inline: auto; } }

  .fv-hero__tag {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-2) var(--sp-4);
    background: rgba(196, 151, 59, 0.15);
    border: 1px solid rgba(196, 151, 59, 0.25);
    border-radius: var(--r-full);
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--fv-accent);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: var(--sp-6);
  }
  .fv-hero__tag-dot {
    width: 6px;
    height: 6px;
    background: var(--fv-accent);
    border-radius: var(--r-full);
    animation: fv-pulse-dot 2s ease-in-out infinite;
  }

  .fv-hero__headline {
    font-family: var(--font-display);
    font-size: var(--text-hero);
    font-weight: 700;
    line-height: var(--leading-tight);
    color: var(--fv-text-inverse);
    margin-bottom: var(--sp-6);
    letter-spacing: -0.02em;
  }
  :lang(ja) .fv-hero__headline {
    font-family: var(--font-body-ja);
    font-size: var(--text-hero-ja);
    letter-spacing: 0.02em;
  }

  .fv-hero__desc {
    font-size: var(--text-lg);
    color: rgba(255,255,255,0.75);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--sp-8);
    max-width: 520px;
  }
  @media (max-width: 900px) { .fv-hero__desc { margin-inline: auto; } }

  .fv-hero__badges {
    margin-top: var(--sp-8);
  }
  @media (max-width: 900px) { .fv-hero__badges .fv-badge-row { justify-content: center; } }

  /* Hero Visual — Logo Animation Area */
  .fv-hero__visual {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
  }
  @media (max-width: 900px) {
    .fv-hero__visual { display: none; }
  }
  .fv-hero__logo-anim {
    width: 100%;
    max-width: 480px;
    position: relative;
  }
  .fv-hero__logo-anim svg {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 60px rgba(3, 87, 47, 0.3));
  }
  .fv-hero__logo-glow {
    position: absolute;
    inset: -20%;
    background: radial-gradient(circle, rgba(3, 87, 47, 0.15) 0%, transparent 70%);
    animation: fv-glow-pulse 4s ease-in-out infinite;
    pointer-events: none;
  }
  .fv-hero__logo-ring {
    position: absolute;
    inset: -10%;
    border: 1px solid rgba(196, 151, 59, 0.12);
    border-radius: 50%;
    animation: fv-ring-rotate 20s linear infinite;
  }
  .fv-hero__logo-ring::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    width: 16px;
    height: 16px;
    background: radial-gradient(circle, #f0d78c 0%, var(--fv-accent) 50%, rgba(196, 151, 59, 0) 100%);
    border-radius: 50%;
    box-shadow:
      0 0 12px rgba(196, 151, 59, 0.8),
      0 0 30px rgba(196, 151, 59, 0.5),
      0 0 60px rgba(196, 151, 59, 0.25);
    animation: fv-dot-glow 2s ease-in-out infinite;
  }
  .fv-hero__logo-ring--trail-1,
  .fv-hero__logo-ring--trail-2 {
    border-color: transparent;
  }
  .fv-hero__logo-ring--trail-1 { animation-delay: 0.3s; }
  .fv-hero__logo-ring--trail-2 { animation-delay: 0.6s; }
  .fv-hero__logo-ring--trail-1::before {
    width: 12px;
    height: 12px;
    top: -6px;
    opacity: 0.4;
    background: var(--fv-accent);
    box-shadow: 0 0 16px rgba(196, 151, 59, 0.4);
    filter: blur(2px);
  }
  .fv-hero__logo-ring--trail-2::before {
    width: 8px;
    height: 8px;
    top: -4px;
    opacity: 0.2;
    background: var(--fv-accent);
    box-shadow: 0 0 12px rgba(196, 151, 59, 0.3);
    filter: blur(3px);
  }

  .fv-hero__scroll-cue {
    position: absolute;
    bottom: var(--sp-8);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-2);
    color: rgba(255,255,255,0.5);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    animation: fv-scroll-bounce 2s ease-in-out infinite;
  }

  /* ─ About Section ─ */
  .fv-about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-16);
    align-items: center;
  }
  @media (max-width: 900px) {
    .fv-about-grid { grid-template-columns: 1fr; gap: var(--sp-8); }
  }
  .fv-about__image-wrap {
    position: relative;
    border-radius: var(--r-2xl);
    overflow: hidden;
    box-shadow: var(--fv-shadow-xl);
  }
  .fv-about__image-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--r-2xl);
    pointer-events: none;
  }
  .fv-about__image {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: transform var(--dur-slower) var(--ease-out);
  }
  .fv-about__image-wrap:hover .fv-about__image { transform: scale(1.03); }
  .fv-about__text p {
    font-size: var(--text-base);
    color: var(--fv-text-sub);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--sp-6);
  }

  /* ─ Promise Grid ─ */
  .fv-promise-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-6);
  }
  @media (max-width: 767px) {
    .fv-promise-grid { grid-template-columns: 1fr; }
  }

  /* ─ Reviews Carousel ─ */
  .fv-reviews-track {
    display: flex;
    gap: var(--sp-6);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--sp-4);
    scrollbar-width: none;
  }
  .fv-reviews-track::-webkit-scrollbar { display: none; }
  .fv-reviews-track > * { scroll-snap-align: start; }

  /* ─ Shipping Section ─ */
  .fv-shipping-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-6);
  }
  @media (max-width: 767px) {
    .fv-shipping-grid { grid-template-columns: 1fr; }
  }
  .fv-shipping-card {
    text-align: center;
    padding: var(--sp-8);
    background: var(--fv-bg);
    border-radius: var(--r-xl);
    border: 1px solid var(--fv-border-light);
    transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
  }
  .fv-shipping-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--fv-shadow-md);
  }
  .fv-shipping-card__icon {
    display: block;
    width: 48px;
    height: 48px;
    margin: 0 auto var(--sp-4);
    color: var(--fv-logo);
  }
  .fv-shipping-card__region {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 700;
    margin-bottom: var(--sp-2);
  }
  :lang(ja) .fv-shipping-card__region { font-family: var(--font-body-ja); }
  .fv-shipping-card__detail {
    font-size: var(--text-sm);
    color: var(--fv-text-sub);
  }

  /* ─ Founder Section ─ */
  .fv-founder {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--sp-10);
    align-items: center;
    max-width: 800px;
    margin-inline: auto;
  }
  @media (max-width: 600px) {
    .fv-founder { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  }
  .fv-founder__photo {
    width: 160px;
    height: 160px;
    border-radius: var(--r-full);
    object-fit: cover;
    border: 4px solid var(--fv-accent-light);
    box-shadow: var(--fv-shadow-lg);
  }
  .fv-founder__role {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--fv-accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--sp-3);
  }
  .fv-founder__quote {
    font-size: var(--text-lg);
    font-style: italic;
    color: var(--fv-text);
    line-height: var(--leading-relaxed);
    position: relative;
    padding-left: var(--sp-6);
    border-left: 3px solid var(--fv-accent);
  }
  @media (max-width: 600px) {
    .fv-founder__quote { padding-left: 0; border-left: none; text-align: center; }
  }

  /* ─ Email Signup ─ */
  .fv-email-form {
    display: flex;
    gap: var(--sp-3);
    max-width: 480px;
    margin-inline: auto;
  }
  @media (max-width: 480px) {
    .fv-email-form { flex-direction: column; }
  }
  .fv-email-form__input {
    flex: 1;
    padding: var(--sp-3) var(--sp-4);
    font-size: var(--text-base);
    background: rgba(255,255,255,0.1);
    border: 1.5px solid rgba(255,255,255,0.2);
    border-radius: var(--r-lg);
    color: var(--fv-text-inverse);
    transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
  }
  .fv-email-form__input::placeholder { color: rgba(255,255,255,0.4); }
  .fv-email-form__input:focus {
    outline: 2px solid var(--fv-accent);
    outline-offset: 2px;
    border-color: var(--fv-accent);
  }

  /* ─ CTA Section ─ */
  .fv-cta {
    text-align: center;
  }
  .fv-cta__headline {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--fv-text-inverse);
    margin-bottom: var(--sp-4);
  }
  :lang(ja) .fv-cta__headline { font-family: var(--font-body-ja); }
  .fv-cta__desc {
    font-size: var(--text-base);
    color: rgba(255,255,255,0.7);
    margin-bottom: var(--sp-8);
  }

  /* ─ Washi Pattern Background ─ */
  .fv-washi-bg {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23C4973B' stroke-width='0.3' opacity='0.08'%3E%3Cpath d='M40 0L80 40L40 80L0 40Z'/%3E%3Cpath d='M40 0L40 80'/%3E%3Cpath d='M0 40L80 40'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 120px;
    pointer-events: none;
    animation: fv-pattern-drift 80s linear infinite;
  }
}

/* ── Utilities ── */
@layer utilities {
  .fv-text-center { text-align: center; }
  .fv-text-muted { font-size: var(--text-sm); color: var(--fv-text-sub); }
  .fv-text-muted-light { font-size: var(--text-sm); color: rgba(255,255,255,0.5); }
  .fv-mt-4 { margin-top: var(--sp-4); }
  .fv-mt-6 { margin-top: var(--sp-6); }
  .fv-mt-8 { margin-top: var(--sp-8); }
  .fv-mt-10 { margin-top: var(--sp-10); }
  .fv-mt-12 { margin-top: var(--sp-12); }
  .fv-mt-16 { margin-top: var(--sp-16); }
  .fv-mx-auto { margin-inline: auto; }
  .fv-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
  .fv-relative { position: relative; }
  .fv-img-fluid { width: 100%; height: auto; }
}

/* ── Animations ── */
@layer animations {
  /* Reveal on scroll */
  .fv-reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity var(--dur-slower) var(--ease-out), transform var(--dur-slower) var(--ease-out);
  }
  .fv-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
  .fv-reveal--left { transform: translateX(-32px); }
  .fv-reveal--right { transform: translateX(32px); }
  .fv-reveal--scale { transform: scale(0.92); }
  .fv-reveal--left.is-visible,
  .fv-reveal--right.is-visible { transform: translateX(0); }
  .fv-reveal--scale.is-visible { transform: scale(1); }

  /* Stagger delays */
  .fv-stagger-1 { transition-delay: 0ms; }
  .fv-stagger-2 { transition-delay: 100ms; }
  .fv-stagger-3 { transition-delay: 200ms; }
  .fv-stagger-4 { transition-delay: 300ms; }

  /* Hero entry animations */
  .fv-hero-enter {
    opacity: 0;
    transform: translateY(24px);
  }
  .fv-hero-enter.is-loaded {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  }
  .fv-hero-enter--delay-1.is-loaded { transition-delay: 0.2s; }
  .fv-hero-enter--delay-2.is-loaded { transition-delay: 0.4s; }
  .fv-hero-enter--delay-3.is-loaded { transition-delay: 0.6s; }
  .fv-hero-enter--delay-4.is-loaded { transition-delay: 0.8s; }
  .fv-hero-enter--delay-5.is-loaded { transition-delay: 1.0s; }

  /* Logo SVG draw animation */
  .fv-logo-draw path {
    fill: transparent;
    stroke: #FFFFFF;
    stroke-width: 2;
    stroke-dasharray: var(--path-len, 2000);
    stroke-dashoffset: var(--path-len, 2000);
  }
  .fv-logo-draw.is-animating path {
    animation:
      fv-draw-stroke 1.2s var(--ease-out) forwards,
      fv-fill-white 0.5s var(--ease-out) 1.4s forwards;
  }
  .fv-logo-draw.is-animating path:nth-child(1) { animation-delay: 0s, 1.4s; }
  .fv-logo-draw.is-animating path:nth-child(2) { animation-delay: 0.1s, 1.5s; }
  .fv-logo-draw.is-animating path:nth-child(3) { animation-delay: 0.2s, 1.6s; }
  .fv-logo-draw.is-animating path:nth-child(4) { animation-delay: 0.3s, 1.7s; }
  .fv-logo-draw.is-animating path:nth-child(5) { animation-delay: 0.4s, 1.8s; }
  .fv-logo-draw.is-animating path:nth-child(6) { animation-delay: 0.5s, 1.9s; }
  .fv-logo-draw.is-animating path:nth-child(7) { animation-delay: 0.6s, 2.0s; }
  .fv-logo-draw.is-animating path:nth-child(8) { animation-delay: 0.7s, 2.1s; }

  @keyframes fv-draw-stroke {
    to { stroke-dashoffset: 0; }
  }
  @keyframes fv-fill-white {
    to { fill: #FFFFFF; stroke: transparent; }
  }

  @keyframes fv-bg-drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, -20px) scale(1.05); }
  }

  @keyframes fv-glow-pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
  }

  @keyframes fv-ring-rotate {
    0% { transform: rotate(0deg); }
    12% { transform: rotate(130deg); }
    30% { transform: rotate(160deg); }
    42% { transform: rotate(290deg); }
    60% { transform: rotate(320deg); }
    72% { transform: rotate(450deg); }
    90% { transform: rotate(480deg); }
    100% { transform: rotate(540deg); }
  }

  @keyframes fv-dot-glow {
    0%, 100% {
      box-shadow:
        0 0 12px rgba(196, 151, 59, 0.8),
        0 0 30px rgba(196, 151, 59, 0.5),
        0 0 60px rgba(196, 151, 59, 0.25);
    }
    50% {
      box-shadow:
        0 0 16px rgba(196, 151, 59, 1),
        0 0 40px rgba(196, 151, 59, 0.7),
        0 0 80px rgba(196, 151, 59, 0.35);
    }
  }

  @keyframes fv-pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
  }

  @keyframes fv-scroll-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
  }

  @keyframes fv-pattern-drift {
    from { background-position: 0 0; }
    to { background-position: 120px 120px; }
  }

  /* Logo hover micro-interaction */
  .fv-hero__logo-anim:hover svg path {
    filter: drop-shadow(0 0 8px rgba(196, 151, 59, 0.4));
    transition: filter 0.3s ease;
  }

  /* Floating product images in hero (mobile fallback) */
  @media (max-width: 900px) {
    .fv-hero {
      min-height: auto;
      padding-block: calc(80px + var(--sp-16)) var(--sp-16);
    }
  }

  /* Card hover glow effect */
  .fv-card {
    position: relative;
    overflow: hidden;
  }
  .fv-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(196, 151, 59, 0.06), transparent 60%, rgba(3, 87, 47, 0.04));
    opacity: 0;
    transition: opacity var(--dur-base) var(--ease-out);
    pointer-events: none;
  }
  .fv-card:hover::after { opacity: 1; }

  /* Smooth section transitions with gradient edges */
  .fv-section--dark + .fv-section::before,
  .fv-section--green + .fv-section::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.02), transparent);
    pointer-events: none;
  }

  /* Reduced motion */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
    .fv-reveal { opacity: 1; transform: none; }
    .fv-hero-enter { opacity: 1; transform: none; }
  }
}
