/* Gryffin: the company's home page, a showcase of its products, each of which keeps its own
   site.

   World: Persian navy velvet embroidered in gold thread (the hero photograph sets it). Navy
   pile for the grounds, antique gold for the thread and the one accent, firouzeh (turquoise)
   only as a second thread, the way it runs through the embroidery.
   Surface: real velvet. The page itself is paisley-and-girih jacquard velvet; cards are padded
   velvet cushions, dark where they face you and lit at the rim, with a stitched gold seam;
   bolts are joined with a gold satin-stitch braid; the close repeats the embroidered medallion.
   Type: Lalezar (Borna Izadpanah, after the lettering of Tehran's Lalezar street signs) for
   display, Vazirmatn for text. Self-hosted, licences in ./licenses.
   Persian text never gets letter-spacing: it breaks the joins between letters.
   No scripts (the CSP forbids them). One authored moment: the velvet breathes and a light
   passes over the embroidery while the headline rises; after that only hover responds. */

@font-face { font-family: "Lalezar"; src: url("fonts/Lalezar.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("fonts/Vazirmatn-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("fonts/Vazirmatn-Bold.woff2") format("woff2"); font-weight: 600 800; font-display: swap; }

/* One deliberate look, dark in every theme: the night page. */
:root {
  --night: #060a1c;
  --deep: #0c1434;
  --lapis: #111a44;
  --lapis-up: #1c2a66;
  --line: rgb(212 171 90 / 0.16);
  --line-strong: rgb(212 171 90 / 0.3);
  --text: #f4efe2;
  --soft: #b9bfd6;
  --saffron: #d4ab5a;
  --saffron-up: #e6c27a;
  --ink: #14162a;
  --ink-soft: #4a4636;
  --lamp: rgb(70 95 200 / 0.28);
  --firouzeh: #3fb7ad;
  --anar: #c0392b;
  --shadow: 1 3 12;
  --font-display: "Lalezar", "Vazirmatn", Tahoma, system-ui, sans-serif;
  --font-body: "Vazirmatn", Tahoma, "Segoe UI", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

/* --- the parts of the page the browser draws ---------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--lapis-up) var(--night); background: var(--night); }
body {
  margin: 0;
  background:
    linear-gradient(rgb(6 10 28 / 0.35), rgb(6 10 28 / 0.35)),
    url("img/velvet-paisley.webp") center top / 1254px 706px,
    var(--night);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--saffron); color: var(--ink); }
a { color: inherit; text-underline-offset: 0.3em; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 3px; border-radius: 8px; }
[dir="ltr"] { unicode-bidi: isolate; }
img { max-width: 100%; }
/* The pile: a fine grain over everything, like light caught in velvet fibres. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none;
  background: url("img/velvet-grain.svg") 0 0 / 240px 240px;
  mix-blend-mode: soft-light; opacity: 0.22;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wrap { max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; margin: 0; text-wrap: balance; }

/* The khatam, faint, fading out from where it's placed. */
.textured { position: relative; isolation: isolate; }
.textured::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("img/khatam.svg?v=20261008b") center / 96px 96px;
  opacity: 0.09;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at var(--tx, 30%) 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 80% at var(--tx, 30%) 40%, #000 20%, transparent 75%);
}

/* --- buttons ---------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: 999px;
  position: relative;
  background:
    radial-gradient(ellipse 70% 80% at 50% 50%, rgb(150 90 10 / 0.32), transparent 75%),
    radial-gradient(ellipse 110% 140% at 50% 10%, #f0d796, var(--saffron) 55%, #9c7230);
  color: var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap;
  box-shadow: 0 12px 26px -12px rgb(212 171 90 / 0.7), inset 0 -3px 8px rgb(110 60 0 / 0.35), inset 0 2px 4px rgb(255 240 200 / 0.45);
  transition: background-color 160ms ease, transform 160ms var(--ease-out);
}
.btn::before {  /* stitching around the cushion */
  content: ""; position: absolute; inset: 4px; border-radius: inherit; pointer-events: none;
  border: 1.4px dashed rgb(90 50 0 / 0.45);
}
.btn svg { width: 20px; height: 20px; stroke-width: 2.25; transition: transform 220ms var(--ease-out); }
.btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: radial-gradient(ellipse 70% 80% at 50% 50%, rgb(150 90 10 / 0.22), transparent 75%), radial-gradient(ellipse 110% 140% at 50% 10%, #f7e3b0, var(--saffron-up) 55%, #ad8239); }
  .btn:hover svg { transform: translateX(-4px); }  /* forward, in a right-to-left page */
}

/* --- header ------------------------------------------------------------------------- */
.bar.top { position: absolute; top: 0; inset-inline: 0; z-index: 5; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.wordmark { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.wordmark svg { width: 26px; height: 26px; color: var(--saffron); stroke-width: 1.6; }
.wordmark b { font-family: var(--font-display); font-weight: 400; font-size: 1.9rem; line-height: 1; }
.wordmark span { font-size: 0.9rem; color: var(--soft); }
.bar nav { display: flex; gap: 4px; }
.bar nav a { padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--soft); transition: background-color 180ms ease, color 180ms ease; }
.bar nav a:hover { color: var(--text); background: var(--line); }

/* --- hero: Iran at night, the products lit across it -------------------------------------- */
.hero {
  --hero-h: min(100vh, 900px);
  position: relative; isolation: isolate; overflow: hidden;
  min-height: var(--hero-h);
  display: grid; align-items: center;
  background: linear-gradient(#0e1f33, #071527 55%, #030f1e);
}
/* The map keeps the photo's own proportions, so each light sits exactly on its city. */
.hero-map {
  /* the whole country always fits the height of the screen; the photo's empty sea on the
     right melts into the hero's own navy */
  position: absolute; z-index: -2; left: 0; top: 56px;
  height: calc(var(--hero-h) - 56px); width: auto; aspect-ratio: 1672 / 941;
  background: url("img/iran-network.webp") center / 100% 100% no-repeat;
  transform-origin: 28% 50%;
  -webkit-mask-image: linear-gradient(to right, #000 78%, transparent), linear-gradient(to bottom, transparent, #000 9%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, #000 78%, transparent), linear-gradient(to bottom, transparent, #000 9%);
  mask-composite: intersect;
}
.node { position: absolute; width: 0; height: 0; }
.node::before, .node::after {
  content: ""; position: absolute; left: 0; top: 0; border-radius: 50%; translate: -50% -50%;
  animation: inherit;
}
.node::before {  /* when the light is low, the city dims */
  width: 30px; height: 30px; background: radial-gradient(closest-side, rgb(6 14 34 / 0.92), rgb(6 14 34 / 0.6) 55%, transparent);
  animation-name: dim;
}
.node::after {   /* when it is high, it blooms */
  width: 64px; height: 64px; mix-blend-mode: screen;
  background: radial-gradient(closest-side, rgb(220 255 255 / 0.95), rgb(80 220 240 / 0.6) 22%, rgb(40 170 220 / 0.18) 55%, transparent);
  animation-name: glow;
}
.node.s::before { width: 16px; height: 16px; }
.node.s::after { width: 34px; height: 34px; background: radial-gradient(closest-side, rgb(255 236 190 / 0.95), rgb(240 190 100 / 0.5) 30%, transparent); }
.node { animation: 4s ease-in-out infinite; }
.n1 { left: 8.25%; top: 17.00%; animation-delay: 0.00s; animation-duration: 3.2s; }
.n2 { left: 16.93%; top: 30.29%; animation-delay: 5.63s; animation-duration: 4.4s; }
.n3 { left: 13.46%; top: 43.68%; animation-delay: 4.26s; animation-duration: 5.6s; }
.n4 { left: 21.71%; top: 63.55%; animation-delay: 2.89s; animation-duration: 3.8s; }
.n5 { left: 32.72%; top: 70.67%; animation-delay: 1.52s; animation-duration: 5.0s; }
.n6 { left: 37.02%; top: 48.57%; animation-delay: 0.15s; animation-duration: 3.2s; }
.n7 { left: 24.16%; top: 33.79%; animation-delay: 5.78s; animation-duration: 4.4s; }
.n8 { left: 5.68%; top: 36.45%; animation-delay: 4.41s; animation-duration: 5.6s; }
.n9 { left: 13.76%; top: 33.90%; animation-delay: 3.04s; animation-duration: 3.8s; }
.n10 { left: 29.13%; top: 39.74%; animation-delay: 1.67s; animation-duration: 5.0s; }
.n11 { left: 30.14%; top: 55.26%; animation-delay: 0.30s; animation-duration: 3.2s; }
.n12 { left: 42.64%; top: 58.02%; animation-delay: 5.93s; animation-duration: 4.4s; }
.n13 { left: 48.56%; top: 75.35%; animation-delay: 4.56s; animation-duration: 5.6s; }
.n14 { left: 24.82%; top: 26.25%; animation-delay: 3.19s; animation-duration: 3.8s; }
.n15 { left: 43.90%; top: 44.31%; animation-delay: 1.82s; animation-duration: 5.0s; }
.n16 { left: 29.49%; top: 30.07%; animation-delay: 0.45s; animation-duration: 3.2s; }
.n17 { left: 31.28%; top: 48.35%; animation-delay: 6.08s; animation-duration: 4.4s; }
.n18 { left: 35.23%; top: 24.87%; animation-delay: 4.71s; animation-duration: 5.6s; }
.n19 { left: 41.87%; top: 68.23%; animation-delay: 3.34s; animation-duration: 3.8s; }
.n20 { left: 17.22%; top: 52.28%; animation-delay: 1.97s; animation-duration: 5.0s; }
.n21 { left: 11.06%; top: 25.08%; animation-delay: 0.60s; animation-duration: 3.2s; }
.n22 { left: 47.13%; top: 61.11%; animation-delay: 6.23s; animation-duration: 4.4s; }
.n23 { left: 17.05%; top: 36.66%; animation-delay: 4.86s; animation-duration: 5.6s; }
.hero::after {  /* night deepens toward the words, and settles into the page below */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to left, rgb(6 12 32 / 0.85), rgb(6 12 32 / 0.35) 40%, transparent 58%),
    linear-gradient(to bottom, rgb(4 6 18 / 0.7), transparent 14%, transparent 82%, var(--night));
}
.hero-in { width: 100%; padding-block: 120px 96px; display: flex; justify-content: flex-start; }
.hero-text { max-width: 560px; }
.hero h1 { font-size: clamp(2.6rem, 4vw + 1rem, 4.9rem); line-height: 1.25; text-shadow: 0 4px 30px rgb(0 0 0 / 0.6); }
.hero h1 .line { display: block; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(180deg, #f4dc9c, var(--saffron) 55%, #a87b30);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; filter: drop-shadow(0 3px 12px rgb(0 0 0 / 0.55));
}
.hero .lede { margin: 20px 0 22px; max-width: 40ch; font-size: clamp(1.08rem, 0.4vw + 1rem, 1.25rem); color: #d3d7e6; text-shadow: 0 2px 16px rgb(0 0 0 / 0.7); }
.uses { list-style: none; margin: 0 0 32px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.uses li {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  font-size: 0.95rem; color: var(--text); background: rgb(14 30 70 / 0.6);
  border: 1px solid rgb(90 210 230 / 0.28); backdrop-filter: blur(6px);
}
.uses li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #6fe6f2; box-shadow: 0 0 10px #6fe6f2; }

/* A gold satin-stitch braid where one bolt of velvet is sewn to the next. */
.frieze { height: 24px; background: url("img/braid.svg") center / 48px 24px repeat-x; box-shadow: 0 6px 14px rgb(0 0 0 / 0.5); position: relative; z-index: 1; }

/* --- products -------------------------------------------------------------------------- */
.products { padding-bottom: clamp(72px, 10vw, 140px); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head h2 { font-size: clamp(2rem, 1.6vw + 1.4rem, 2.8rem); line-height: 1.25; }
.section-head .count { color: var(--soft); font-variant-numeric: tabular-nums; }

.panels { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.panel.featured, .panel.wide { grid-column: 1 / -1; }
.panel > article {
  position: relative; height: 100%; display: grid; overflow: hidden;
  border-radius: 24px; border: 1px solid var(--line);
  background:
    radial-gradient(ellipse 75% 70% at 50% 45%, rgb(3 5 16 / 0.55), transparent 78%),
    radial-gradient(ellipse 120% 90% at 50% 0%, #22306e, var(--deep) 60%, #070b20);
  box-shadow: 0 34px 70px -40px rgb(var(--shadow) / 0.9), inset 0 2px 1px rgb(170 190 255 / 0.12), inset 0 -18px 40px rgb(0 0 0 / 0.35);
}
.panel.featured > article { grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); }
.panel.wide > article { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); }
.panel > article::after {  /* the stitched seam, gold thread */
  content: ""; position: absolute; inset: 9px; border-radius: 17px; pointer-events: none; z-index: 3;
  border: 1.5px dashed rgb(212 171 90 / 0.45);
}
.panel-text { position: relative; z-index: 1; display: flex; flex-direction: column; min-width: 0; padding: clamp(24px, 3.4vw, 48px); }
.panel-head { display: flex; align-items: center; gap: 18px; }
.mark {
  flex: none; display: grid; place-items: center; width: 68px; height: 68px; overflow: hidden;
  border-radius: 16px; background: #fff; box-shadow: 0 10px 22px -12px rgb(var(--shadow) / 0.9);
}
.mark img { width: 58px; height: 58px; }
.mark.letter { background: radial-gradient(ellipse 90% 90% at 35% 20%, #f0d796, var(--saffron) 55%, #9c7230); color: var(--ink); font-family: var(--font-display); font-size: 2.4rem; line-height: 1; }
.panel h3 { font-size: clamp(2rem, 1.4vw + 1.5rem, 2.9rem); line-height: 1.2; }
.tagline { margin: 2px 0 0; color: var(--soft); }
.for { margin: 22px 0 0; }
.for b { color: var(--saffron); font-weight: 700; }
.what { margin: 4px 0 0; max-width: 54ch; color: var(--soft); }
.points { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 22px; }
.points li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.98rem; line-height: 1.7; }
.points svg { flex: none; width: 20px; height: 20px; margin-top: 3px; color: var(--saffron); stroke-width: 2.4; }
.panel-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: auto; padding-top: 30px; }
.address { font-size: 0.86rem; color: var(--soft); }

/* The product itself, in browser frames, leaning toward its name. */
.shots {
  position: relative; display: grid; align-items: center; min-height: 380px;
  padding: clamp(28px, 3.4vw, 52px) clamp(12px, 2vw, 28px); perspective: 1600px;
  background: radial-gradient(closest-side at 50% 55%, var(--lamp), transparent 85%);
}
.shots.scene {
  background: #070a18 url("img/shekarchi-velvet.webp") center / cover no-repeat;
  box-shadow: inset 0 0 80px rgb(0 0 0 / 0.55);
  align-items: end; min-height: 460px;
}
.shots.scene .frame.back { display: none; }
.shots.scene .frame.front {
  width: 48%; justify-self: start; align-self: end; transform: rotate(-3deg) translateY(4px);
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.9), 0 0 0 1px rgb(212 171 90 / 0.35);
}
@media (hover: hover) and (pointer: fine) {
  .panel.featured:hover .shots.scene .frame.front { transform: rotate(0deg) translateY(-6px) scale(1.03); }
}
.frame {
  margin: 0; overflow: hidden; border-radius: 14px; background: #070a18;
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.03), 0 50px 90px -40px rgb(0 0 0 / 0.85), 0 18px 36px -24px rgb(0 0 0 / 0.6);
  transition: transform 700ms var(--ease-out), opacity 700ms var(--ease-out);
}
.frame .chrome { display: flex; gap: 6px; padding: 9px 12px; background: #0e1430; border-bottom: 1px solid var(--line); }
.frame .chrome i { width: 9px; height: 9px; border-radius: 50%; background: rgb(255 255 255 / 0.2); }
.frame img { display: block; width: 100%; height: auto; }
.frame.front { position: relative; z-index: 2; width: 96%; justify-self: end; transform: rotateY(-16deg) rotateX(6deg); transform-origin: 0% 50%; }
.frame.back { position: absolute; z-index: 1; width: 78%; top: 8%; inset-inline-start: 6%; opacity: 0.5; transform: rotateY(-16deg) rotateX(6deg) translateZ(-140px); }
@media (hover: hover) and (pointer: fine) {
  .panel.featured:hover .frame.front { transform: rotateY(-6deg) rotateX(2deg); }
  .panel.featured:hover .frame.back { opacity: 0.7; transform: rotateY(-8deg) rotateX(3deg) translateZ(-100px) translateY(-10px); }
}

/* A product without pictures: its mark, large, like an icon on a home screen. */
.monogram {
  position: relative; display: grid; place-items: center; min-height: 300px;
  background: radial-gradient(closest-side, var(--lamp), transparent 80%);
}
.monogram::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: url("img/khatam.svg?v=20261008b") center / 72px 72px; opacity: 0.12;
  -webkit-mask-image: radial-gradient(closest-side, #000, transparent);
  mask-image: radial-gradient(closest-side, #000, transparent);
}
.monogram span {
  position: relative; display: grid; place-items: center; width: clamp(150px, 16vw, 210px); aspect-ratio: 1;
  border-radius: 28%; color: var(--ink);
  background: radial-gradient(ellipse 90% 90% at 35% 20%, #f0d796, var(--saffron) 55%, #9c7230);
  font-family: var(--font-display); font-size: clamp(5rem, 7vw, 7.5rem); line-height: 1;
  box-shadow: 0 40px 70px -30px rgb(0 0 0 / 0.7), inset 0 -14px 30px rgb(100 55 0 / 0.35), inset 0 6px 14px rgb(255 240 200 / 0.4);
  transform: rotate(-8deg);
  transition: transform 600ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .panel:hover .monogram span { transform: rotate(0deg) scale(1.03); }
}
.panel:not(.featured):not(.wide) .monogram { min-height: 220px; }

/* A product shown in its own photograph: a bright room seen through a window in the velvet.
   The photo keeps its colours; a navy tint and a soft inner shadow settle it into the night
   page, and the gold-thread seam frames it like the cards. */
.photo {
  position: relative; margin: clamp(14px, 1.6vw, 22px); margin-inline-start: 0;
  border-radius: 18px; overflow: hidden; min-height: 280px;
  box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.9), 0 0 0 1px rgb(212 171 90 / 0.4);
}
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%;
  transition: transform 900ms var(--ease-out); }
.photo::before {  /* navy settle */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to left, rgb(12 20 52 / 0.55), rgb(12 20 52 / 0.12) 30%, transparent 55%), rgb(30 45 110 / 0.14);
  mix-blend-mode: multiply;
  box-shadow: inset 0 0 60px rgb(6 10 30 / 0.55);
}
.photo::after {  /* gold seam */
  content: ""; position: absolute; inset: 8px; z-index: 2; border-radius: 12px; pointer-events: none;
  border: 1.5px dashed rgb(212 171 90 / 0.6);
}
@media (hover: hover) and (pointer: fine) { .panel:hover .photo img { transform: scale(1.04); } }

/* --- about: a lighter bolt of the same jacquard velvet ------------------------------------ */
.about {
  position: relative; padding-block: clamp(80px, 10vw, 140px);
  background:
    radial-gradient(ellipse 55% 80% at 85% 40%, rgb(80 105 220 / 0.22), transparent 70%),
    radial-gradient(ellipse 70% 90% at 10% 100%, rgb(0 0 0 / 0.45), transparent 70%),
    url("img/velvet-paisley.webp") center / 1254px 706px,
    var(--lapis);
  box-shadow: inset 0 30px 60px -30px rgb(0 0 0 / 0.7), inset 0 -30px 60px -30px rgb(0 0 0 / 0.7);
}
.about-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 72px; align-items: start; }
.about h2 { font-size: clamp(1.9rem, 2vw + 1.2rem, 3.1rem); line-height: 1.4; text-shadow: 0 3px 24px rgb(0 0 0 / 0.6); }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { padding-block: 20px; border-top: 1.5px dashed rgb(212 171 90 / 0.4); color: var(--soft); font-size: clamp(1.08rem, 0.5vw + 1rem, 1.3rem); line-height: 1.8; }
.facts li:first-child { border-top: 0; padding-top: 6px; }
.facts b { display: block; color: var(--saffron); font-weight: 700; }

/* --- contact: the embroidered medallion again, the page closing as it opened ------------- */
.contact {
  position: relative; isolation: isolate; overflow: hidden;
  padding-block: clamp(80px, 10vw, 140px);
  background:
    radial-gradient(ellipse 50% 70% at 20% 50%, rgb(60 80 190 / 0.25), transparent 70%),
    linear-gradient(rgb(5 8 24 / 0.55), rgb(5 8 24 / 0.55)),
    url("img/velvet-paisley.webp") center / 1254px 706px,
    var(--night);
}
.contact::before {  /* the rosette's heart, embroidered on the cloth */
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: min(760px, 80vw); aspect-ratio: 1; left: 0; top: 50%; transform: translate(-42%, -50%);
  background: url("img/medallion.webp") center / contain no-repeat;
  opacity: 0.9;
}
.contact-in { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 32px 56px; align-items: center; padding-inline-end: clamp(0px, 22vw, 340px); }
.contact h2 {
  font-size: clamp(2.6rem, 3.4vw + 1rem, 4.6rem); line-height: 1.2; white-space: nowrap;
  background: linear-gradient(180deg, #f4dc9c, var(--saffron) 55%, #a87b30);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 16px rgb(0 0 0 / 0.6));
}
.contact-say p { margin: 10px 0 0; color: var(--soft); font-size: 1.15rem; max-width: 36ch; }
.ways {
  position: relative; margin: 0; display: grid; gap: 22px; padding: clamp(30px, 3vw, 44px) clamp(30px, 3.2vw, 46px);
  border-radius: 24px; border: 1px solid var(--line);
  background:
    radial-gradient(ellipse 75% 70% at 50% 45%, rgb(3 5 16 / 0.5), transparent 78%),
    radial-gradient(ellipse 120% 90% at 50% 0%, #22306e, var(--deep) 60%, #070b20);
  box-shadow: 0 40px 80px -40px rgb(0 0 0 / 0.9), inset 0 2px 1px rgb(170 190 255 / 0.12), inset 0 -18px 40px rgb(0 0 0 / 0.35);
}
.ways::after {
  content: ""; position: absolute; inset: 9px; border-radius: 17px; pointer-events: none;
  border: 1.5px dashed rgb(212 171 90 / 0.45);
}
.ways > div { min-width: 0; }
.ways dd a { max-width: 100%; }
.ways dd a span { min-width: 0; overflow-wrap: anywhere; }
.ways .mail dd { font-size: clamp(1rem, 0.6vw + 0.85rem, 1.3rem); }
.ways dt { font-size: 0.92rem; color: var(--soft); }
.ways dd { margin: 2px 0 0; font-size: clamp(1.2rem, 1.1vw + 0.9rem, 1.6rem); font-weight: 800; line-height: 1.5; color: var(--text); }
.ways dd a { display: inline-flex; align-items: center; gap: 12px; text-decoration: underline; text-decoration-color: rgb(212 171 90 / 0.45); text-underline-offset: 0.35em; }
.ways dd a:hover { text-decoration-color: var(--saffron); }
.ways svg { flex: none; width: 26px; height: 26px; stroke-width: 2; color: var(--saffron); }

.foot { font-size: 0.9rem; color: var(--soft); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding-block: 22px 30px; }

/* --- the page for an address that isn't there (404.html) --------------------------- */
.missing { min-height: 100vh; min-height: 100dvh; }
.missing-in { padding-block: clamp(48px, 10vw, 120px); }
.missing-in h1 { font-size: clamp(2.4rem, 4vw + 1rem, 4.4rem); line-height: 1.3; }
.missing-in p { color: var(--soft); max-width: 46ch; margin: 18px 0 30px; font-size: 1.15rem; }

/* --- the one moment: the rosette draws itself in while the line rises --------------------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .hero-map { animation: drift 40s ease-in-out infinite alternate; }
  .hero h1 .line, .hero .lede, .hero .btn { animation: rise 900ms var(--ease-out) backwards; }
  .hero h1 .line + .line { animation-delay: 90ms; }
  .hero .lede { animation-delay: 200ms; }
  .hero .btn { animation-delay: 280ms; }
}
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.03); } }
@keyframes glow { 0%, 100% { opacity: 0.08; scale: 0.6; } 50% { opacity: 1; scale: 1.15; } }
@keyframes dim { 0%, 100% { opacity: 1; } 45%, 60% { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

@media (prefers-reduced-motion: reduce) { .node::before, .node::after { animation: none; } .node::before { opacity: 0; } .node::after { opacity: 0.6; } }

/* --- narrower screens ------------------------------------------------------------------ */
@media (max-width: 1000px) {
  .panel.featured > article, .panel.wide > article { grid-template-columns: minmax(0, 1fr); }
  .frame.front { width: 100%; }
  .shots { min-height: 0; padding-top: 0; }
  .about-in, .contact-in { grid-template-columns: minmax(0, 1fr); }
  .contact-in { align-items: start; }
}
@media (max-width: 760px) {
  .hero { min-height: 0; align-items: end; }
  .hero-map { top: 56px; height: auto; width: 175vw; left: -2vw; animation: none; -webkit-mask-image: none; mask-image: none; }
  .node::after { width: 40px; height: 40px; }
  .node::before { width: 18px; height: 18px; }
  .node.s::after { width: 22px; height: 22px; }
  .node.s::before { width: 10px; height: 10px; }
  .hero::after { background: linear-gradient(to bottom, rgb(4 6 18 / 0.6), transparent 12%, transparent 34%, rgb(6 10 28 / 0.75) 52%, var(--night) 70%); }
  .hero-in { padding-block: 430px 56px; }
  .contact::before { width: 110vw; top: 0; transform: translate(-50%, -38%); opacity: 0.4; }
  .contact-in { padding-inline-end: var(--gutter); }
  .shots.scene { min-height: 320px; }
  .shots.scene .frame.front { width: 62%; }
  .panels { grid-template-columns: minmax(0, 1fr); }
  .panel > article { border-radius: 20px; }
  .points { grid-template-columns: minmax(0, 1fr); }
  .frame.front { width: 100%; transform: none; }
  .frame.back { display: none; }
  .monogram { min-height: 200px; }
  .photo { margin: 0 14px 14px; min-height: 0; aspect-ratio: 4 / 3; }
  .photo img { object-position: 50% 45%; }
  .bar nav a { padding: 8px 9px; }
  .wordmark span { display: none; }
}
