/* ============================================================
   ASK Studio — guide.css
   Shared styling for guide / landing / content pages
   (everything except the WebGL homepage). Dark luxury editorial.
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
/* Design tokens now live in css/tokens.css (single source of truth),
   linked before this file on every page. The old :root here diverged
   from the homepage (--ink-2 0.55, --ink-3 0.32 ~2.4:1) — unified. */
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

/* ---------- atelier finish: film grain + reveal-on-scroll ----------
   Lifts the homepage's grain + motion into the guide/lander estate so it reads
   as the same tier — both pure CSS. Grain is a fixed feTurbulence overlay.
   Reveals use scroll-driven animation guarded by @supports, so browsers without
   it (today: Safari, Firefox) simply show the content — no JS, no content-hiding,
   SEO-safe. The LCP hero is deliberately excluded. */
body::after {
  content: ""; position: fixed; inset: -100px; z-index: 90;
  pointer-events: none; opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 7s steps(8) infinite;
}
@keyframes grain {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-44px, 30px); }
  50%  { transform: translate(26px, -40px); }
  75%  { transform: translate(-30px, -22px); }
  100% { transform: translate(40px, 36px); }
}
@media (prefers-reduced-motion: reduce) { body::after { animation: none; } }

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    main h2,
    main .wcard:not(.wcard--feature),
    main .wp-gallery figure,
    main .dims,
    main .steps li {
      animation: estate-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 34%;
    }
  }
}
@keyframes estate-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.label {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-decoration: none;
}
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #0e0d0b; padding: 10px 16px; z-index: 10;
}
.skip-link:focus { left: 12px; top: 12px; }
/* visible keyboard focus for every interactive element (a11y) */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
a:focus-visible, summary:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- header / nav ---------- */
header.site {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: clamp(18px, 2.5vw, 28px) var(--pad);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
header.site img { height: clamp(34px, 4.2vw, 46px); width: auto; display: block; }
.sitenav { display: flex; align-items: center; gap: clamp(14px, 2.6vw, 30px); flex-wrap: wrap; justify-content: flex-end; }
.sitenav a { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); transition: color 0.3s; }
.sitenav a:hover, .sitenav a[aria-current] { color: var(--accent); }

/* ---------- layout ---------- */
main { max-width: 880px; margin: 0 auto; padding: clamp(28px, 5vh, 64px) var(--pad) clamp(80px, 12vh, 160px); }
main.wide { max-width: 1100px; }

/* ---------- breadcrumb ---------- */
.crumbs { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 22px; }
.crumbs a { color: var(--ink-2); text-decoration: none; transition: color 0.3s; }
.crumbs a:hover { color: var(--accent); }
.crumbs span[aria-hidden] { margin: 0 8px; color: var(--ink-3); }

/* ---------- type ---------- */
h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(40px, 6.4vw, 88px);
  line-height: 1.03;
  letter-spacing: -0.02em;
  margin: 14px 0 26px;
}
h1 em { font-style: italic; font-weight: 250; color: var(--accent); }
.lead {
  font-family: var(--serif);
  font-size: clamp(19px, 2.2vw, 26px);
  font-weight: 350;
  line-height: 1.5;
  max-width: 38em;
  margin-bottom: clamp(36px, 6vh, 72px);
}
h2 {
  font-family: var(--serif);
  font-weight: 350;
  font-size: clamp(25px, 3.1vw, 38px);
  line-height: 1.16;
  letter-spacing: -0.01em;
  margin: clamp(44px, 7vh, 80px) 0 16px;
  max-width: 24em;
}
h3 {
  font-family: var(--serif);
  font-weight: 350;
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.2;
  margin: 30px 0 10px;
}
p { max-width: 640px; color: var(--ink-2); margin-bottom: 18px; font-size: 15px; line-height: 1.85; }
p strong { color: var(--ink); font-weight: 400; }
a.inline, main p a, main li a { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(185,154,100,0.5); text-underline-offset: 3px; transition: text-decoration-color 0.3s; }
main p a:hover, main li a:hover { text-decoration-color: var(--accent); }
ul, ol { max-width: 640px; color: var(--ink-2); margin: 0 0 18px 18px; font-size: 15px; line-height: 1.85; }
li { margin-bottom: 8px; }
li::marker { color: var(--accent); }
.rule { border: 0; border-top: 1px solid var(--line); margin: clamp(44px, 7vh, 80px) 0; }

/* ---------- figure ---------- */
figure { margin: 0 0 clamp(40px, 7vh, 80px); }
figure img { width: 100%; height: auto; display: block; border-radius: 2px; }
.figure--hero img { aspect-ratio: 16 / 9; height: auto; object-fit: cover; }
figcaption { margin-top: 12px; }

/* ---------- callout / note ---------- */
.note {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 22px;
  margin: 26px 0;
  max-width: 640px;
}
.note p { margin: 0; color: var(--ink); }

/* ---------- price / spec table ---------- */
.tablewrap { max-width: 720px; overflow-x: auto; margin: 8px 0 26px; }
table.spec { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.spec th, table.spec td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: top; }
table.spec th { color: var(--ink); font-weight: 400; }
table.spec td:first-child { color: var(--ink); }

/* ---------- FAQ accordion ---------- */
.faqs { max-width: 720px; margin: 8px 0 0; }
.faqs details { border-top: 1px solid var(--line); }
.faqs details:last-child { border-bottom: 1px solid var(--line); }
.faqs summary {
  list-style: none; cursor: pointer; padding: 20px 36px 20px 0; position: relative;
  font-family: var(--serif); font-size: clamp(17px, 1.9vw, 21px); color: var(--ink); font-weight: 350;
}
.faqs summary::-webkit-details-marker { display: none; }
.faqs summary::after { content: "+"; position: absolute; right: 4px; top: 18px; color: var(--accent); font-size: 22px; transition: transform 0.3s; }
.faqs details[open] summary::after { transform: rotate(45deg); }
.faqs details p { padding: 0 0 20px; }

/* ---------- cards (hub / related products) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: clamp(18px, 2.4vw, 30px); margin: 14px 0 24px; }
.card {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-radius: 3px; overflow: hidden; background: rgba(232,226,214,0.02);
  transition: border-color 0.4s, transform 0.4s;
}
.card:hover { border-color: rgba(232,226,214,0.34); transform: translateY(-3px); }
.card img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.card__body { padding: 16px 18px 20px; }
.card__body h3 { font-size: 20px; margin: 0 0 6px; }
.card__body p { font-size: 13.5px; margin: 0; color: var(--ink-2); max-width: none; }
.card__kicker { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }

/* ---------- related links ---------- */
.related { max-width: 720px; }
.related ul { list-style: none; margin: 8px 0 0; padding: 0; }
.related li { border-top: 1px solid var(--line); margin: 0; }
.related li:last-child { border-bottom: 1px solid var(--line); }
.related a { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 16px 0; text-decoration: none; color: var(--ink); transition: color 0.3s; }
.related a:hover { color: var(--accent); }
.related a span { font-size: 12.5px; color: var(--ink-2); text-align: right; }
.related a .lbl { font-size: 15px; color: var(--ink); text-align: left; }

/* ---------- CTA ---------- */
.cta {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid rgba(232, 226, 214, 0.4);
  border-radius: 99px;
  padding: 14px 30px;
  transition: background 0.4s, color 0.4s, border-color 0.4s;
}
.cta:hover { background: var(--accent); border-color: var(--accent); color: #0e0d0b; }
.cta--solid { background: var(--accent); border-color: var(--accent); color: #0e0d0b; }
.cta--solid:hover { background: transparent; border-color: rgba(232,226,214,0.4); color: var(--ink); }
.cta + .cta { margin-left: 12px; }
.cta--wa { border-color: rgba(185, 154, 100, 0.55); }

/* ---------- ordering assurances ---------- */
.assure {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  max-width: 720px;
  margin: 10px 0 4px;
  background: var(--line);
  border: 1px solid var(--line);
}
.assure > div { background: var(--bg); padding: 16px 18px; display: flex; flex-direction: column; gap: 5px; }
.assure b { font-weight: 400; color: var(--ink); font-size: 13.5px; }
.assure span { font-size: 12.5px; line-height: 1.6; color: var(--ink-2); max-width: none; }
@media (max-width: 560px) { .assure { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
footer.site { padding: clamp(40px, 7vh, 80px) var(--pad) clamp(30px, 5vh, 50px); border-top: 1px solid var(--line); }
footer.site nav { display: flex; flex-wrap: wrap; gap: clamp(14px, 2.6vw, 28px); margin-bottom: 22px; }
footer.site nav a { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); transition: color 0.3s; text-decoration: none; }
footer.site nav a:hover { color: var(--accent); }

/* ---------- floating CTA (Inquire + WhatsApp) — mirrors the homepage FAB ---------- */
.guidecta {
  position: fixed;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vw, 30px);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.7s ease;
}
.guidecta.is-on { opacity: 1; transform: none; pointer-events: auto; }
.guidecta a { text-decoration: none; }
.guidecta__inquire,
.guidecta__wa {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(14, 13, 11, 0.55);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
  transition: background 0.4s, color 0.4s, border-color 0.4s;
}
.guidecta__inquire {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 13px 26px;
  border-radius: 99px;
}
.guidecta__wa { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; }
.guidecta__wa svg { width: 20px; height: 20px; fill: currentColor; }
.guidecta__inquire:hover,
.guidecta__wa:hover { background: var(--accent); border-color: var(--accent); color: #0e0d0b; }
@media print { .guidecta { display: none; } }

/* ---------- RTL (Arabic pages) ---------- */
html[dir="rtl"] .guidecta { right: auto; left: clamp(16px, 3vw, 32px); }
html[dir="rtl"] body { font-family: "Tajawal", var(--sans); }
html[dir="rtl"] h1, html[dir="rtl"] .lead, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] .faqs summary { font-family: "Amiri", var(--serif); }
html[dir="rtl"] .sitenav { justify-content: flex-start; }
html[dir="rtl"] ul, html[dir="rtl"] ol { margin: 0 18px 18px 0; }
html[dir="rtl"] .note { border-left: 0; border-right: 2px solid var(--accent); padding: 4px 22px 4px 0; }
html[dir="rtl"] .faqs summary { padding: 20px 0 20px 36px; }
html[dir="rtl"] .faqs summary::after { right: auto; left: 4px; }
html[dir="rtl"] table.spec th, html[dir="rtl"] table.spec td { text-align: right; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
