/* Coffee & Crystals — site styles */

/* ============================================================
     Coffee & Crystals — design tokens
     A single committed world: the moment of walking up to a
     caravan at night and finding warm light in the window.
     Deliberately single-theme (not adaptive to OS light/dark) —
     the nocturnal caravan mood IS the brand, not a UI preference.
     ============================================================ */
  :root {
    --night-950: #12141c;
    --night-900: #171a24;
    --night-800: #1d2129;
    --night-700: #292f3b;
    --night-600: #3a4152;

    --lantern-400: #f0b054;
    --lantern-300: #f6cb85;
    --lantern-600: #b97a35;

    --wagon-500: #9c4a3f;
    --wagon-400: #b5665a;

    --parchment-100: #f3ead4;
    --parchment-300: rgba(243, 234, 212, 0.72);
    --parchment-500: rgba(243, 234, 212, 0.46);

    --font-display: 'Almendra', 'Georgia', serif;
    --font-body: 'Cormorant Garamond', Georgia, serif;

    --arch: 130px 130px 6px 6px;
    --arch-sm: 70px 70px 4px 4px;
    --max: 1160px;
  }

  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }

  body {
    margin: 0;
    background: var(--night-950);
    color: var(--parchment-100);
    font-family: var(--font-body);
    font-size: 19px;
    line-height: 1.65;
  }

  img { max-width: 100%; display: block; }
  a { color: inherit; text-decoration: none; }

  h1, h2, h3 {
    font-family: var(--font-display);
    text-wrap: balance;
    margin: 0 0 0.5em;
    font-weight: 600;
    letter-spacing: 0.01em;
  }

  .wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; }

  .eyebrow {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 1.05rem;
    color: var(--lantern-300);
    margin: 0 0 0.5em;
  }

  .btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: var(--arch-sm);
    font-family: var(--font-display);
    font-size: 0.92rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .btn-primary {
    background: var(--lantern-400);
    color: var(--night-950);
    box-shadow: 0 0 0 1px rgba(240, 176, 84, 0.4), 0 14px 30px -12px rgba(240, 176, 84, 0.55);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
  }
  .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--lantern-300), 0 18px 34px -10px rgba(240, 176, 84, 0.65); }

  .icon { width: 30px; height: 30px; stroke: var(--lantern-400); fill: none; stroke-width: 1.4; }

  /* ---------------- Header ---------------- */

  .site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(18, 20, 28, 0.86);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--night-700);
  }

  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
  }

  .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 0.03em;
  }
  .logo-mark { display: flex; }

  .window-mark { display: block; }
  .window-mark .frame { fill: none; stroke: var(--lantern-400); stroke-width: 1.4; stroke-linecap: round; }
  .window-mark .moon { fill: var(--lantern-300); }
  .window-mark .star { fill: var(--lantern-300); opacity: 0.75; }
  .logo-mark .window-mark { width: 23px; aspect-ratio: 48 / 60; }

  .site-nav { display: flex; gap: 34px; }
  .site-nav a {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 1.08rem;
    color: var(--parchment-300);
    transition: color 0.2s ease;
  }
  .site-nav a:hover { color: var(--lantern-300); }

  .nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
  }
  .nav-toggle span { width: 22px; height: 1.5px; background: var(--parchment-100); display: block; }

  /* ---------------- Hero: the caravan banner ---------------- */

  .hero {
    position: relative;
    padding: 120px 0 100px;
    overflow: hidden;
    min-height: 480px;
    display: flex;
    align-items: center;
  }

  .hero-banner {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 62% center;
    z-index: 0;
    animation: flicker 7s ease-in-out infinite;
  }

  .hero::before {
    /* scrim so the headline stays readable over the photo */
    content: "";
    position: absolute;
    inset: 0;
    background:
      linear-gradient(100deg, rgba(18,20,28,0.94) 0%, rgba(18,20,28,0.82) 30%, rgba(18,20,28,0.42) 58%, rgba(18,20,28,0.35) 100%),
      linear-gradient(0deg, rgba(18,20,28,0.5), transparent 40%);
    z-index: 1;
  }

  .hero-inner { position: relative; z-index: 2; max-width: 640px; }

  .hero h1, .hero-sub, .hero .eyebrow { text-shadow: 0 2px 16px rgba(0,0,0,0.5); }

  .mote {
    position: absolute;
    bottom: 10%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--lantern-300);
    opacity: 0;
    animation: drift 6s ease-in infinite;
    z-index: 1;
  }
  .mote:nth-child(3) { left: 18%; animation-delay: 0.4s; }
  .mote:nth-child(4) { left: 28%; animation-delay: 2.1s; width: 3px; height: 3px; }
  .mote:nth-child(5) { left: 10%; animation-delay: 3.8s; }

  @keyframes drift {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    15% { opacity: 0.75; }
    100% { transform: translateY(-160px) translateX(14px); opacity: 0; }
  }

  @keyframes flicker {
    0%, 100% { filter: brightness(1); }
    45% { filter: brightness(1.035); }
    52% { filter: brightness(0.98); }
    78% { filter: brightness(1.02); }
  }
  @media (prefers-reduced-motion: reduce) {
    .hero-banner { animation: none; }
    .mote { animation: none; opacity: 0.5; }
  }

  /* ---------------- Footer accent ---------------- */

  .footer-accent {
    position: absolute;
    right: 24px;
    bottom: 8px;
    width: 92px;
    filter: drop-shadow(0 10px 22px rgba(0,0,0,0.55));
    opacity: 0.95;
  }
  @media (max-width: 900px) {
    .footer-accent { display: none; }
  }

  .hero h1 {
    font-size: clamp(2.3rem, 4vw, 3.1rem);
    color: var(--parchment-100);
  }
  .hero-sub {
    font-size: 1.28rem;
    color: var(--parchment-300);
    max-width: 46ch;
    margin-bottom: 1.7em;
  }

  /* ---------------- Readings ---------------- */

  .readings { padding: 92px 0; border-top: 1px solid var(--night-700); }

  .section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 44px; flex-wrap: wrap; }
  .section-head h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin: 0; }

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

  .reading-card {
    position: relative;
    padding: 40px 26px 32px;
    background: var(--night-900);
    border: 1px solid var(--night-700);
    border-radius: var(--arch-sm);
  }
  .reading-card .icon { margin-bottom: 18px; }
  .reading-card h3 { font-size: 1.3rem; margin-bottom: 0.2em; }
  .reading-label { font-style: italic; color: var(--lantern-300); font-size: 0.98rem; margin: 0 0 0.9em; }
  .reading-card p { color: var(--parchment-300); margin: 0 0 1em; }

  .card-link {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.82rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--lantern-400);
    border-bottom: 1px solid var(--lantern-600);
    padding-bottom: 2px;
  }

  /* ---------------- Shop ---------------- */

  .shop { padding: 92px 0; background: var(--night-900); border-top: 1px solid var(--night-700); border-bottom: 1px solid var(--night-700); }

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

  .shop-card {
    padding: 24px 20px;
    border-radius: var(--arch-sm);
    background: var(--night-800);
    border: 1px solid var(--night-700);
    transition: border-color 0.2s ease, transform 0.15s ease;
  }
  .shop-card:hover { border-color: var(--lantern-400); transform: translateY(-3px); box-shadow: 0 0 20px 1px rgba(240, 176, 84, 0.28); }
  .shop-card h3 { font-size: 1.08rem; color: var(--parchment-100); margin-bottom: 0.25em; }
  .shop-card p { margin: 0; font-size: 0.96rem; color: var(--parchment-500); }

  .product-thumb-frame {
    width: 64px;
    height: 64px;
    border-radius: var(--arch-sm);
    overflow: hidden;
    border: 1px solid var(--night-600);
    box-shadow: inset 0 0 12px rgba(0,0,0,0.55), 0 0 0 3px var(--night-950), 0 0 0 4px rgba(240, 176, 84, 0.25);
    margin-bottom: 14px;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
  }
  .product-thumb { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease, filter 0.35s ease; }
  .shop-card:hover .product-thumb-frame {
    border-color: var(--lantern-400);
    box-shadow: inset 0 0 12px rgba(0,0,0,0.45), 0 0 0 3px var(--night-950), 0 0 0 4px rgba(240, 176, 84, 0.55), 0 0 22px 2px rgba(240, 176, 84, 0.55);
  }
  .shop-card:hover .product-thumb { transform: scale(1.08); filter: brightness(1.12); }
  .product-card p { color: var(--lantern-300); font-style: italic; }

  /* ---------------- Category pages ---------------- */

  .category-hero { padding: 56px 0 40px; border-bottom: 1px solid var(--night-700); }
  .category-hero .wrap { text-align: center; }
  .category-hero .back-link { color: var(--lantern-300); font-style: italic; }
  .category-hero h1 { font-size: clamp(2rem, 4vw, 2.7rem); margin: 0.5em 0 0.35em; }
  .category-hero p { color: var(--parchment-300); max-width: 60ch; margin: 0 auto; }

  .category-window-mark {
    width: 92px;
    aspect-ratio: 48 / 60;
    margin: 0 auto 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--arch);
    background: radial-gradient(circle at 50% 32%, rgba(240, 176, 84, 0.18), transparent 70%), var(--night-900);
    border: 1px solid var(--night-700);
  }
  .category-window-mark svg { width: 58%; height: auto; }

  .category-hero-art {
    max-width: 420px;
    margin: 0 auto 10px;
  }
  .category-hero-art img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 46px rgba(240, 176, 84, 0.22)) drop-shadow(0 20px 28px rgba(0,0,0,0.55));
  }

  .category-products { padding: 60px 0 100px; }
  .product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 24px; }

  .product-tile {
    background: var(--night-800);
    border: 1px solid var(--night-700);
    border-radius: var(--arch-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s ease, transform 0.15s ease;
  }
  .product-tile:hover { border-color: var(--lantern-400); transform: translateY(-3px); box-shadow: 0 0 24px 2px rgba(240, 176, 84, 0.32); }

  .product-photo {
    margin: 14px 14px 0;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    background: var(--parchment-100);
    box-shadow: 0 10px 20px -4px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .product-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
    box-sizing: border-box;
    display: block;
    transition: transform 0.35s ease;
  }
  .product-tile:hover .product-photo img { transform: scale(1.05); }
  .product-tile-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; }
  .product-tile-body h3 { font-size: 1.05rem; margin: 0; color: var(--parchment-100); }
  .product-tile-body p { margin: 0; font-size: 0.92rem; color: var(--parchment-300); }
  .product-tile .cta {
    margin-top: 6px;
    font-family: var(--font-display);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--lantern-400);
  }

  /* ---------------- About ---------------- */

  .about { padding: 96px 0; }
  .about-inner { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: center; }
  .about-mark {
    aspect-ratio: 1;
    border-radius: var(--arch);
    background: radial-gradient(circle at 40% 35%, rgba(240,176,84,0.18), transparent 70%), var(--night-900);
    border: 1px solid var(--night-700);
    overflow: hidden;
    box-shadow: inset 0 0 24px rgba(0,0,0,0.5), 0 0 0 4px rgba(240, 176, 84, 0.18);
  }
  .about-mark img { width: 100%; height: 100%; object-fit: cover; }
  .about h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
  .about p { color: var(--parchment-300); }

  /* ---------------- Journal ---------------- */

  .journal { padding: 92px 0; border-top: 1px solid var(--night-700); }
  .journal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .journal-card { padding: 28px; border-radius: var(--arch-sm); border: 1px solid var(--night-700); }
  .journal-card h3 { font-size: 1.18rem; margin-bottom: 0.4em; }
  .journal-card p { color: var(--parchment-300); font-size: 0.98rem; margin: 0 0 1em; }

  /* ---------------- Footer ---------------- */

  .site-footer {
    position: relative;
    padding: 56px 0 40px;
    border-top: 1px solid var(--night-700);
    background:
      radial-gradient(ellipse 50% 60% at 50% 0%, rgba(240,176,84,0.08), transparent 70%),
      var(--night-950);
  }
  .footer-inner { text-align: center; }
  .footer-logo { font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 0.5em; letter-spacing: 0.03em; }

  .footer-social { display: flex; justify-content: center; gap: 12px; margin: 0 0 1.3em; }
  .footer-social a {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--night-700);
    transition: border-color 0.2s ease, transform 0.15s ease;
  }
  .footer-social a:hover { border-color: var(--lantern-400); transform: translateY(-2px); }
  .footer-social svg { width: 16px; height: 16px; stroke: var(--lantern-400); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
  .disclosure { max-width: 600px; margin: 0 auto 1em; font-size: 0.92rem; color: var(--parchment-500); }
  .copyright { font-size: 0.85rem; color: var(--parchment-500); margin: 0; opacity: 0.7; }

  .wagon-mark { color: var(--wagon-400); }

  /* ---------------- Responsive ---------------- */

  @media (max-width: 940px) {
    .hero { min-height: 420px; padding: 100px 0 80px; }
    .hero-banner { object-position: 70% center; }
    .readings-grid { grid-template-columns: 1fr; }
    .shop-grid { grid-template-columns: repeat(2, 1fr); }
    .about-inner { grid-template-columns: 1fr; }
    .about-mark { max-width: 260px; margin: 0 auto; }
    .about-photos { justify-content: center; }
    .journal-grid { grid-template-columns: 1fr; }
  }

  @media (max-width: 720px) {
    .nav-toggle { display: flex; }
    .site-nav {
      position: absolute; top: 100%; left: 0; right: 0;
      flex-direction: column; background: var(--night-900);
      border-bottom: 1px solid var(--night-700);
      padding: 14px 28px 26px; gap: 16px; display: none;
    }
    .site-nav.is-open { display: flex; }
    .header-inner { position: relative; }
  }

  @media (max-width: 480px) {
    .shop-grid { grid-template-columns: 1fr; }
  }
