/* Niran website — extracted from index.html <style> block */

:root {
    /* Palette — defaults match Tweak palette 'Ink' */
    --bg: #0e0e0c;
    --fg: #e8e2d5;
    --fg-soft: rgba(232, 226, 213, 0.62);
    --fg-dim: rgba(232, 226, 213, 0.36);
    --tan: #a89678;
    --green: #0f3a32;
    --gold: #c9a86b;
    --rule: rgba(232, 226, 213, 0.14);

    /* Type defaults */
    --font-display: "Cormorant Garamond", serif;
    --font-body: "IBM Plex Sans", system-ui, sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, monospace;
    --font-thai: "Arimo", system-ui, sans-serif;

    /* Density */
    --gutter: clamp(20px, 4vw, 56px);
    --section-pad: clamp(80px, 12vw, 180px);
  }

  * { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg); }
  html { scroll-behavior: smooth; }
  body {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
  }
  img { display: block; max-width: 100%; }
  a { color: inherit; text-decoration: none; }
  button { font: inherit; color: inherit; background: none; border: 0; cursor: default; }

  /* Reveal on scroll */
  .reveal { opacity: 0; transform: translateY(14px); transition: opacity 1.2s ease, transform 1.2s cubic-bezier(.2,.7,.2,1); }
  .reveal.in { opacity: 1; transform: translateY(0); }

  /* Mono label */
  .label {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--fg-soft);
  }

  /* Section structure */
  section { padding-left: var(--gutter); padding-right: var(--gutter); }

  /* Hide tweak panel chrome behind splash on first paint */
  #root { opacity: 0; transition: opacity .6s ease .2s; }
  #root.ready { opacity: 1; }

  /* 2×2 "Made by hand" step grid */
  .step-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
  }
  .step-cell {
    padding: clamp(40px, 4.4vw, 72px) clamp(28px, 2.8vw, 52px);
    display: flex; flex-direction: column;
    gap: clamp(16px, 1.4vw, 22px);
  }
  .step-cell:nth-child(odd) { padding-left: 0; }
  .step-cell:nth-child(even) { padding-right: 0; border-left: 1px solid var(--rule); }
  .step-cell:nth-child(-n+2) { padding-top: 0; }
  .step-cell:nth-child(n+3) { padding-bottom: 0; border-top: 1px solid var(--rule); }

  @media (max-width: 760px) {
    .step-grid { grid-template-columns: 1fr; }
    .step-cell {
      padding: clamp(28px, 5vw, 44px) 0 !important;
      border-left: 0 !important;
      border-top: 0;
    }
    .step-cell + .step-cell { border-top: 1px solid var(--rule); }
  }

  /* ─── Mobile responsive overrides ─────────────────────────── */
  @media (max-width: 820px) {

    /* Nav: hide section links, keep only logo. Reduce padding. */
    body > div#root header > nav { display: none !important; }

    /* Hero — stack text above image; cap image height */
    .hero-grid {
      grid-template-columns: 1fr !important;
      min-height: auto !important;
      padding-top: clamp(96px, 18vh, 140px) !important;
      padding-bottom: clamp(48px, 8vh, 80px) !important;
      gap: clamp(28px, 6vw, 48px) !important;
    }
    /* The hero image container is the 2nd direct child div */
    .hero-grid > div:nth-of-type(2) {
      height: clamp(360px, 75vw, 560px) !important;
      width: 100%;
    }
    /* Scroll hint: hide on mobile (gets in the way) */
    .hero-grid > div:last-child { display: none !important; }

    /* Story / Manifesto — stack image + thai + english */
    .story-grid {
      grid-template-columns: 1fr !important;
      gap: clamp(28px, 6vw, 44px) !important;
    }
    /* Image was 3/4 aspect — keep but unbreak sticky on mobile */
    .story-grid > figure { position: static !important; }

    /* Atelier founder block — stack portrait above message */
    .founder-grid {
      grid-template-columns: 1fr !important;
      gap: clamp(28px, 6vw, 40px) !important;
    }
    .founder-grid > figure { position: static !important; max-width: 280px; }

    /* Collection main header — stack title and meta */
    .coll-section-header {
      grid-template-columns: 1fr !important;
      gap: 18px !important;
      padding-bottom: 18px !important;
    }
    .coll-section-header > div:last-child { text-align: left !important; }

    /* Collection subsection headers — stack their three pieces */
    .coll-sub-header {
      grid-template-columns: 1fr !important;
      gap: 10px !important;
    }
    .coll-sub-header > div:last-child { text-align: left !important; }

    /* Collection cards — 2 columns on tablet, 1 column on phones */
    .coll-cards {
      grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
      gap: clamp(20px, 4vw, 32px) !important;
    }

    /* Process section — stack image above text */
    .process-grid {
      grid-template-columns: 1fr !important;
      gap: clamp(24px, 5vw, 40px) !important;
    }

    /* Distributors region header — stack pieces */
    .region-header {
      grid-template-columns: 1fr !important;
      gap: 6px !important;
    }
    /* Distributors cards — 2 then 1 column */
    .dist-cards {
      grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
      gap: clamp(20px, 4vw, 32px) !important;
    }

    /* Afterlife — stack label above flows; flows go vertical */
    .afterlife-block {
      grid-template-columns: 1fr !important;
      gap: clamp(28px, 6vw, 40px) !important;
    }
    .afterlife-flow {
      flex-direction: column !important;
      align-items: center !important;
      gap: clamp(8px, 2vw, 14px) !important;
    }
    .afterlife-flow .flow-arrow {
      margin-top: 0 !important;
      transform: rotate(90deg);
    }
    .afterlife-flow .flow-step {
      width: 100%;
    }

    /* Footer — stack columns */
    .footer-grid {
      grid-template-columns: 1fr !important;
      gap: 32px !important;
    }

    /* Reduce section vertical padding so the page isn't endless */
    main > section,
    main > footer,
    footer {
      padding-left: var(--gutter) !important;
      padding-right: var(--gutter) !important;
    }
    main > section {
      padding-top: clamp(60px, 12vw, 100px) !important;
      padding-bottom: clamp(60px, 12vw, 100px) !important;
    }

    /* Tighten gutter on narrow screens */
    :root { --gutter: clamp(18px, 5vw, 28px); }
  }

  /* Phones */
  @media (max-width: 520px) {
    .coll-cards {
      grid-template-columns: 1fr !important;
    }
    .dist-cards {
      grid-template-columns: 1fr !important;
    }
    /* Big display headlines were sized for big screens — bring them in */
    .hero-grid h1 {
      font-size: clamp(34px, 9.6vw, 52px) !important;
    }
  }
