/* Annoon website. Tokens follow the Annoon Design System (paper ground, ink text, Brockmann / IBM Plex Sans / Geist Mono). */

:root {
  --paper: #F3F1EC;
  --surface: #E8E4DC;
  --ink: #121214;
  --ink-2: #3B3934;
  --dim: #8A857C;
  --faint: #CBC5BA;
  --rule: #D3CEC5;
  --line: #B9B3A8;
  --on-kv: #111214;

  --font-display: "Brockmann", "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", "IBM Plex Mono", Menlo, monospace;
  --font-arabic: "IBM Plex Sans Arabic", "Geeza Pro", Tahoma, sans-serif;

  --gutter: 12px;
  --inset: 36px;
  --radius: 28px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
}

@font-face {
  font-family: "Brockmann";
  src: url("assets/fonts/brockmann-medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; inset-inline-start: 16px; top: -64px; z-index: 20;
  padding: 12px 18px; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-size: 14px; text-decoration: none;
}
.skip:focus { top: 16px; }

/* Hero */

.hero-wrap { padding: var(--gutter); }

.hero {
  position: relative;
  height: calc(100svh - 2 * var(--gutter));
  min-height: 600px;
  max-height: 1040px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  isolation: isolate;
}

.hero-media { position: absolute; inset: 0; }
.hero-img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }

.hero-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 28px var(--inset);
}
.logo { display: block; line-height: 0; }
.logo img { height: 16px; width: auto; }
.logo img.lockup { height: 20px; }

/* Menu, 70% of the original pill. The ::after keeps a 44px tall tap target. */
.pill {
  display: flex; align-items: center; gap: 1px;
  padding: 3px; border-radius: 999px;
  background: var(--paper); font-size: 11px;
}
.pill a {
  position: relative;
  display: inline-flex; align-items: center;
  min-height: 28px; padding: 0 13px; border-radius: 999px;
  text-decoration: none; white-space: nowrap;
  transition: background-color .25s ease;
}
.pill a::after { content: ""; position: absolute; inset: -8px 0; }
.pill a:hover { background: var(--surface); }

.hero-foot {
  position: absolute; left: var(--inset); right: var(--inset); bottom: 40px; z-index: 2;
  display: flex; flex-direction: column; gap: 28px;
  color: var(--paper);
}
.hero-title {
  margin: 0; max-width: 1000px;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(42px, 6.6vw, 100px); line-height: .98; letter-spacing: -.04em;
  text-wrap: balance;
}
.hero-sub {
  margin: 0; max-width: 520px;
  font-size: 24px; line-height: 1.4; letter-spacing: -.005em;
  text-wrap: pretty;
}
.line { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.line-in { display: block; }

/* Overview */

.overview { padding: 200px 48px 0; }
.statement {
  margin: 0; max-width: 1180px;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(30px, 3.9vw, 56px); line-height: 1.14; letter-spacing: -.025em;
  color: var(--dim);
  text-wrap: balance;
}
.statement .k { color: var(--ink); }

/* Contact */

.contact { padding: 180px var(--gutter) 0; }
.panel {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px; row-gap: 40px; align-items: end;
  padding: 64px var(--inset);
  border-radius: var(--radius);
  background: var(--surface);
}
.panel-copy { grid-column: 1 / span 6; display: flex; flex-direction: column; gap: 22px; }
.panel-copy h2 {
  margin: 0;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(30px, 3.2vw, 46px); line-height: 1.08; letter-spacing: -.025em;
}
.panel-copy p { margin: 0; max-width: 460px; font-size: 18px; color: var(--ink-2); text-wrap: pretty; }

.panel-mail { grid-column: 8 / span 5; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.label { font-size: 15px; color: var(--ink-2); }

.mail {
  padding-bottom: 4px;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(20px, 1.7vw, 24px); line-height: 1.2; letter-spacing: -.015em;
  text-decoration: none;
  background:
    linear-gradient(var(--ink), var(--ink)) 0 100% / 0 1.5px no-repeat,
    linear-gradient(var(--line), var(--line)) 0 100% / 100% 1.5px no-repeat;
  transition: background-size .6s var(--ease-out);
}
.mail:hover, .mail:focus-visible { background-size: 100% 1.5px, 100% 1.5px; }

.copy {
  margin-top: 6px; min-height: 44px; padding: 0 20px;
  border: 1px solid var(--ink); border-radius: 999px;
  background: transparent; color: var(--ink); cursor: pointer;
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase;
  transition: background-color .3s var(--ease-out), color .3s var(--ease-out), transform .3s var(--ease-out);
}
.copy:hover, .copy.is-copied { background: var(--ink); color: var(--paper); }
.copy:hover { transform: translateY(-1px); }
.copy:active { transform: scale(.98); }

/* Footer */

.site-foot { padding: 120px var(--gutter) var(--gutter); }
.foot-panel {
  position: relative; height: 360px;
  border-radius: var(--radius); overflow: hidden;
  background: var(--surface);
}
.foot-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.foot-in {
  position: absolute; top: 0; inset-inline-start: 0; bottom: 0; max-width: 440px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: 40px var(--inset);
  color: var(--on-kv);
}
.foot-logo { height: 18px; width: auto; align-self: flex-start; }
.foot-logo.lockup { height: 22px; }
.foot-meta { display: flex; flex-direction: column; gap: 8px; font-size: 16px; }
.mono { font-family: var(--font-mono); font-size: 13px; font-weight: 500; letter-spacing: .04em; }

/* Responsive */

@media (max-width: 900px) {
  .panel { grid-template-columns: minmax(0, 1fr); }
  .panel-copy, .panel-mail { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  :root { --inset: 20px; }
  .hero { height: auto; min-height: 0; max-height: none; overflow: visible; background: transparent; }
  .hero-media { position: relative; height: 440px; border-radius: 24px; overflow: hidden; }
  .hero-top { padding: 20px; flex-wrap: wrap; row-gap: 14px; }
  .hero-foot { position: static; padding: 28px 20px 0; color: var(--ink); }
  .hero-sub { font-size: 19px; }
  .overview { padding: 120px 32px 0; }
  .contact { padding-top: 120px; }
  .panel { padding: 40px 20px; }
  .foot-panel { height: 300px; }
  .foot-img { object-position: 0% 50%; }
  [dir="rtl"] .foot-img { object-position: 100% 50%; }
  .foot-in { max-width: 220px; padding: 28px 20px; }
}

/* Arabic. Set in IBM Plex Sans Arabic, never Brockmann or Geist Mono; no letter-spacing or uppercase. */

body:lang(ar) { font-family: var(--font-arabic); }
.hero-title:lang(ar) { font-family: var(--font-arabic); font-weight: 600; line-height: 1.25; letter-spacing: 0; }
.hero-sub:lang(ar) { font-size: 24px; line-height: 1.6; letter-spacing: 0; }
.statement:lang(ar) { font-family: var(--font-arabic); font-weight: 500; line-height: 1.5; letter-spacing: 0; }
.panel-copy h2:lang(ar) { font-family: var(--font-arabic); font-weight: 600; line-height: 1.35; letter-spacing: 0; }
.panel-copy p:lang(ar) { line-height: 1.75; }
.copy:lang(ar) { font-family: var(--font-arabic); font-size: 14px; letter-spacing: 0; text-transform: none; }
.mono:lang(ar) { font-family: var(--font-arabic); font-size: 14px; letter-spacing: 0; }
.pill a:lang(ar) { font-family: var(--font-arabic); font-size: 12px; }
.pill a:lang(en) { font-family: var(--font-body); font-size: 11px; }
.line:lang(ar) { padding: .22em 0; margin: -.22em 0; }

@media (max-width: 640px) {
  .hero-sub:lang(ar) { font-size: 18px; }
}

/* Smooth scrolling (Lenis) */

html.motion { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* Motion. Everything below runs only when the visitor has not asked for reduced motion. */

@keyframes focus-in {
  from { opacity: 0; filter: blur(18px); transform: scale(1.08); }
  to { opacity: 1; filter: blur(0); transform: none; }
}
@keyframes line-up { from { transform: translateY(105%); } to { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes drift { to { transform: translateY(20%) scale(1.04); } }
@keyframes lift { to { transform: translateY(-90px); opacity: 0; } }
@keyframes w-fill { from { color: #CBC5BA; } to { color: #8A857C; } }
@keyframes w-fill-k { from { color: #CBC5BA; } to { color: #121214; } }

/* B: line reveal and focus */
.motion .hero:not(.is-ready) .hero-img,
.motion .hero:not(.is-ready) .hero-top,
.motion .hero:not(.is-ready) .hero-title,
.motion .hero:not(.is-ready) .hero-sub { opacity: 0; }

.motion .hero.is-ready .hero-img { animation: focus-in 2s var(--ease-out) both; }
.motion .hero.is-ready .hero-top { animation: fade .9s ease both .5s; }
.motion .hero.is-ready .line-in { animation: line-up 1.1s var(--ease-out) both; animation-delay: calc(.3s + var(--i, 0) * .12s); }
.motion .hero-title.no-anim .line-in { animation: none; }
.motion .hero.is-ready .hero-sub { animation: rise 1s var(--ease-out) both .85s; }

/* G fallback: browsers without scroll-driven animations light the words in sequence */
.motion .statement.is-split .w { color: var(--faint); transition: color .7s ease; transition-delay: calc(var(--p, 0) * 1.1s); }
.motion .statement.is-lit .w { color: var(--dim); }
.motion .statement.is-lit .w.k { color: var(--ink); }

@supports (animation-timeline: view()) {
  /* D: scroll parallax on the hero */
  @media (min-width: 641px) {
    .motion .hero { view-timeline: --hero block; }
    .motion .hero-media { animation: drift linear both; animation-timeline: --hero; animation-range: exit 0% exit 100%; }
    .motion .hero-foot { animation: lift linear both; animation-timeline: --hero; animation-range: exit 0% exit 55%; }
  }
  /* G: words fill in as the statement scrolls through the view */
  .motion .statement { view-timeline: --ov block; }
  .motion .statement .w {
    animation: w-fill linear both;
    animation-timeline: --ov;
    animation-range: cover calc(14% + var(--p, 0) * 34%) cover calc(18% + var(--p, 0) * 34%);
  }
  .motion .statement .w.k { animation-name: w-fill-k; }
}

/* K: footer key visual wipes up */
.motion .foot-panel { clip-path: inset(100% 0 0 0 round var(--radius)); transition: clip-path 1.3s var(--ease-in-out); }
.motion .foot-panel.is-in { clip-path: inset(0 0 0 0 round var(--radius)); }
.motion .foot-img { transform: scale(1.1); transition: transform 1.8s var(--ease-out); }
.motion .foot-panel.is-in .foot-img { transform: none; }
.motion .foot-in > * { opacity: 0; transform: translateY(14px); transition: opacity .8s ease, transform .9s var(--ease-out); }
.motion .foot-panel.is-in .foot-in > * { opacity: 1; transform: none; transition-delay: .75s; }
.motion .foot-panel.is-in .foot-in > * + * { transition-delay: .9s; }
