/* REEHA RADAR holding page. Tokens and rules: docs/design/DESIGN.md */

/* Fonts (self-hosted, SIL OFL; licences in /fonts/) */
@font-face {
  font-family: "Marhey";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/marhey-arabic-600-normal.woff2") format("woff2");
  unicode-range:
    U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "Marhey";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/marhey-arabic-700-normal.woff2") format("woff2");
  unicode-range:
    U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "Marhey";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/marhey-latin-600-normal.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC,
    U+2122, U+2212;
}
@font-face {
  font-family: "Marhey";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/marhey-latin-700-normal.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC,
    U+2122, U+2212;
}
@font-face {
  font-family: "Noto Sans Arabic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/noto-sans-arabic-arabic-400-normal.woff2") format("woff2");
  unicode-range:
    U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "Noto Sans Arabic";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/noto-sans-arabic-arabic-600-normal.woff2") format("woff2");
  unicode-range:
    U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "Noto Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/noto-sans-latin-400-normal.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC,
    U+2122, U+2212;
}
@font-face {
  font-family: "Noto Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/noto-sans-latin-600-normal.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC,
    U+2122, U+2212;
}

/* Tokens: light is Pigment */
:root {
  color-scheme: light;
  --bg: #f3f2ef;
  --surface: #fbfaf8;
  --rail: #e6e4df;
  --ink: #1b1a18;
  --ink-soft: #64615b;
  --action: #11806f;
  --on-action: #ffffff;
  --action-text: #0e7465;
  --ok: #4f7a55;
  --warn: #9a5b2e;

  --note-citrus: #c4a04e;
  --note-green: #7d8c68;
  --note-aqua: #6e8696;
  --note-floral: #b58587;
  --note-musk: #a398a2;
  --note-amber: #a5673c;
  --note-woody: #5c4232;

  --font-display: "Marhey", "Noto Sans Arabic", "Noto Sans", system-ui, sans-serif;
  --font-text: "Noto Sans Arabic", "Noto Sans", system-ui, sans-serif;

  --gutter: 16px;
  --strip-height: 168px;
  --ease-ink: cubic-bezier(0.3, 0.8, 0.2, 1);
}

/* Dark is Noir: follows the system unless the visitor picked light */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #151318;
    --surface: #1c1a20;
    --rail: #221f26;
    --ink: #ece6de;
    --ink-soft: #a39c95;
    --action: #3ccbb4;
    --on-action: #0c1a18;
    --action-text: #3ccbb4;
    --ok: #8fb58a;
    --warn: #d49a5e;

    --note-citrus: #d3ae5e;
    --note-green: #8fa27b;
    --note-aqua: #7e98aa;
    --note-floral: #c99496;
    --note-musk: #a892ad;
    --note-amber: #bf7a47;
    --note-woody: #8c6449;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151318;
  --surface: #1c1a20;
  --rail: #221f26;
  --ink: #ece6de;
  --ink-soft: #a39c95;
  --action: #3ccbb4;
  --on-action: #0c1a18;
  --action-text: #3ccbb4;
  --ok: #8fb58a;
  --warn: #d49a5e;

  --note-citrus: #d3ae5e;
  --note-green: #8fa27b;
  --note-aqua: #7e98aa;
  --note-floral: #c99496;
  --note-musk: #a892ad;
  --note-amber: #bf7a47;
  --note-woody: #8c6449;
}

@media (min-width: 768px) {
  :root {
    --gutter: 24px;
    --strip-height: 232px;
  }
}
@media (min-width: 1440px) {
  :root {
    --gutter: 32px;
    --strip-height: 272px;
  }
}

/* Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.7;
  font-variant-numeric: tabular-nums;
}

/* Colours cross-fade only while the visitor switches theme, never on load */
.theme-switching,
.theme-switching * {
  transition:
    background-color 300ms ease,
    color 300ms ease,
    border-color 300ms ease,
    fill 300ms ease !important;
}

h1,
h2 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.35;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: var(--action-text);
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  inset-inline-start: var(--gutter);
  inset-block-start: 8px;
  padding: 8px 16px;
  border-radius: 10px;
  background: var(--action);
  color: var(--on-action);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus-visible {
  transform: none;
}

.ltr {
  direction: ltr;
  unicode-bidi: isolate;
}

.shell {
  width: 100%;
  max-width: calc(1200px + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Header */
.site-header .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
}

.wordmark {
  display: inline-flex;
  align-items: flex-end;
  gap: 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.06em;
  line-height: 1;
  text-decoration: none;
}
.wordmark svg {
  flex: none;
  fill: var(--action);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 12px;
  border-radius: 10px;
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}
.lang-link:hover {
  color: var(--ink);
  background: var(--rail);
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--rail);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: transform 150ms ease;
}
.theme-toggle[hidden] {
  display: none;
}
.theme-toggle:hover {
  border-color: var(--ink-soft);
}
.theme-toggle:active {
  transform: scale(0.94);
}
.theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
/* Show the moon in light mode (switch to dark) and the sun in dark mode */
.theme-toggle .icon-sun {
  display: none;
}
:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}
:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun {
    display: block;
  }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon {
    display: none;
  }
}

/* Hero */
main {
  flex: 1;
}

.hero .shell {
  display: grid;
  gap: 40px;
  padding-block: 24px 56px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-block-end: 16px;
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 600;
}
.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warn);
}

.hero h1 {
  max-width: 18ch;
  font-size: 1.75rem;
  font-weight: 700;
}

.lead {
  max-width: 36rem;
  margin-block-start: 16px;
  color: var(--ink-soft);
  font-size: 1.125rem;
}

.try {
  margin-block-start: 32px;
}
.try-label {
  margin-block-end: 12px;
  font-size: 0.875rem;
  font-weight: 600;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--rail);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: start;
  cursor: pointer;
  transition: transform 150ms ease;
}
.chip:hover {
  border-color: var(--ink-soft);
}
.chip:active {
  transform: scale(0.97);
}
.chip[aria-pressed="true"] {
  border-color: var(--action);
  background: var(--action);
  color: var(--on-action);
  font-weight: 600;
}

/* Strip fan: an illustration of how a description becomes fragrance families */
.fan {
  margin: 0;
  padding: 24px 16px 20px;
  border: 1px solid var(--rail);
  border-radius: 14px;
  background: var(--surface);
}

.strips {
  /* The fan opens outward in both reading directions */
  --fan-dir: 1;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

[dir="rtl"] .strips {
  --fan-dir: -1;
}

.strip {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.strip-paper {
  position: relative;
  width: min(100%, 40px);
  height: var(--strip-height);
  overflow: hidden;
  border: 1px solid var(--rail);
  border-radius: 4px 4px 2px 2px;
  background: var(--bg);
  transform: rotate(calc(var(--tilt, 0deg) * var(--fan-dir)));
  transform-origin: 50% 100%;
}

.strip-ink {
  position: absolute;
  inset: 0;
  background: var(--note);
  transform: scaleY(var(--fill, 0.04));
  transform-origin: 50% 100%;
  transition: transform 800ms var(--ease-ink);
  animation: wick 1200ms var(--ease-ink) backwards;
}

@keyframes wick {
  from {
    transform: scaleY(0);
  }
}

.strip-name {
  color: var(--ink-soft);
  font-size: 0.75rem;
  line-height: 1.3;
  text-align: center;
}

.strip:nth-child(1) {
  --note: var(--note-citrus);
  --tilt: -4.5deg;
}
.strip:nth-child(2) {
  --note: var(--note-green);
  --tilt: -3deg;
}
.strip:nth-child(3) {
  --note: var(--note-aqua);
  --tilt: -1.5deg;
}
.strip:nth-child(4) {
  --note: var(--note-floral);
}
.strip:nth-child(5) {
  --note: var(--note-musk);
  --tilt: 1.5deg;
}
.strip:nth-child(6) {
  --note: var(--note-amber);
  --tilt: 3deg;
}
.strip:nth-child(7) {
  --note: var(--note-woody);
  --tilt: 4.5deg;
}
.strip:nth-child(1) .strip-ink {
  animation-delay: 0ms;
}
.strip:nth-child(2) .strip-ink {
  animation-delay: 60ms;
}
.strip:nth-child(3) .strip-ink {
  animation-delay: 120ms;
}
.strip:nth-child(4) .strip-ink {
  animation-delay: 180ms;
}
.strip:nth-child(5) .strip-ink {
  animation-delay: 240ms;
}
.strip:nth-child(6) .strip-ink {
  animation-delay: 300ms;
}
.strip:nth-child(7) .strip-ink {
  animation-delay: 360ms;
}

/* Example profiles (illustrative, hand-set): citrus, green, aqua, floral, musk, amber, woody */
.fan[data-example="clean"] .strip:nth-child(1) {
  --fill: 0.72;
}
.fan[data-example="clean"] .strip:nth-child(2) {
  --fill: 0.46;
}
.fan[data-example="clean"] .strip:nth-child(3) {
  --fill: 0.84;
}
.fan[data-example="clean"] .strip:nth-child(4) {
  --fill: 0.3;
}
.fan[data-example="clean"] .strip:nth-child(5) {
  --fill: 0.62;
}
.fan[data-example="clean"] .strip:nth-child(6) {
  --fill: 0.08;
}
.fan[data-example="clean"] .strip:nth-child(7) {
  --fill: 0.26;
}

.fan[data-example="warm"] .strip:nth-child(1) {
  --fill: 0.1;
}
.fan[data-example="warm"] .strip:nth-child(2) {
  --fill: 0.06;
}
.fan[data-example="warm"] .strip:nth-child(3) {
  --fill: 0.04;
}
.fan[data-example="warm"] .strip:nth-child(4) {
  --fill: 0.22;
}
.fan[data-example="warm"] .strip:nth-child(5) {
  --fill: 0.5;
}
.fan[data-example="warm"] .strip:nth-child(6) {
  --fill: 0.86;
}
.fan[data-example="warm"] .strip:nth-child(7) {
  --fill: 0.92;
}

.fan[data-example="summer"] .strip:nth-child(1) {
  --fill: 0.9;
}
.fan[data-example="summer"] .strip:nth-child(2) {
  --fill: 0.58;
}
.fan[data-example="summer"] .strip:nth-child(3) {
  --fill: 0.8;
}
.fan[data-example="summer"] .strip:nth-child(4) {
  --fill: 0.16;
}
.fan[data-example="summer"] .strip:nth-child(5) {
  --fill: 0.28;
}
.fan[data-example="summer"] .strip:nth-child(6) {
  --fill: 0.04;
}
.fan[data-example="summer"] .strip:nth-child(7) {
  --fill: 0.14;
}

.fan figcaption {
  margin-block-start: 20px;
  padding-block-start: 16px;
  border-block-start: 1px dashed var(--rail);
  color: var(--ink-soft);
  font-size: 0.875rem;
}
.fan figcaption strong {
  color: var(--ink);
  font-weight: 600;
}

/* Promises: printed like a receipt, not a card grid */
.promises {
  padding-block: 48px 64px;
  border-block-start: 1px solid var(--rail);
}

.promises h2 {
  font-size: 1.375rem;
  font-weight: 600;
}

.receipt {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: line;
  border-block-start: 1px dashed var(--ink-soft);
}

.receipt li {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 4px 12px;
  padding-block: 16px;
  border-block-end: 1px dashed var(--rail);
  counter-increment: line;
}
.receipt li::before {
  content: counter(line, decimal-leading-zero);
  grid-row: span 2;
  color: var(--ink-soft);
  font-family: "Noto Sans", system-ui, sans-serif;
  font-size: 0.875rem;
  line-height: 1.9;
}
.receipt strong {
  font-weight: 600;
}
.receipt span {
  color: var(--ink-soft);
  font-size: 0.875rem;
}

.merchant-note {
  margin-block-start: 24px;
  color: var(--ink-soft);
}
.merchant-note a {
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* Footer */
.site-footer {
  border-block-start: 1px solid var(--rail);
  color: var(--ink-soft);
  font-size: 0.875rem;
}
.site-footer .shell {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 24px 32px;
}

/* Not-found page */
.not-found .shell {
  padding-block: 48px 96px;
}
.not-found h1 {
  font-size: 1.75rem;
}
.not-found p {
  margin-block-start: 12px;
  color: var(--ink-soft);
}
.not-found .button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-block-start: 24px;
  padding-inline: 20px;
  border-radius: 12px;
  background: var(--action);
  color: var(--on-action);
  font-weight: 600;
  text-decoration: none;
}

/* Layout per breakpoint */
@media (min-width: 768px) {
  .hero .shell {
    gap: 48px;
    padding-block: 40px 72px;
  }
  .hero h1 {
    font-size: 2.25rem;
  }
  .fan {
    padding: 32px 32px 24px;
  }
  .strips {
    gap: 12px;
  }
  .strip-paper {
    width: min(100%, 56px);
  }
  .strip-name {
    font-size: 0.875rem;
  }
  .receipt li {
    grid-template-columns: 3rem minmax(0, 22rem) 1fr;
    align-items: baseline;
  }
  .receipt li::before {
    grid-row: auto;
  }
}

@media (min-width: 1024px) {
  .hero .shell {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: center;
    gap: 24px;
    padding-block: 56px 96px;
  }
  .hero-copy {
    grid-column: 1 / span 7;
  }
  .fan {
    grid-column: 8 / span 5;
  }
  .hero h1 {
    font-size: 2.75rem;
  }
}

@media (min-width: 1440px) {
  .hero .shell {
    gap: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .strip-ink,
  .chip,
  .theme-toggle {
    animation: none;
    transition: none;
  }
  .theme-switching,
  .theme-switching * {
    transition: none !important;
  }
}
