/* arcil.la: paper, clay and the kiln.
   The colours come from the logo: the elephant's stone grey, the vase's
   terracotta fading to cream, on a warm paper. The kiln is the one dark. */

:root {
  --paper: #f3ece3;
  --paper-2: #ebe1d4;
  --paper-3: #e3d6c6;
  --ink: #2a221d;
  --ink-2: #5a4d44;
  --muted: #85766a;
  --stone: #a9aaa9;
  --clay: #b8692f;
  --clay-ink: #94501f;
  --clay-soft: #e6c7ab;
  --cream: #f7f0e6;
  --kiln: #140d0a;
  --kiln-2: #211611;
  --ember: #ffa45c;
  --line: rgba(42, 34, 29, 0.13);
  --line-strong: rgba(42, 34, 29, 0.22);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --bar-h: 68px;
  --gutter: clamp(20px, 5.5vw, 88px);
  --radius: 24px;

  --font-display: "Cormorant Garamond", "Alexandria", Georgia, serif;
  --font-body: "DM Sans", "IBM Plex Sans Arabic", system-ui, sans-serif;
  color-scheme: light;
}

/* Arabic pairs the way English does: a classical book face for headlines
   (Amiri, as Cormorant is in English), a calligraphic Ruq'ah for the one
   word a headline leans on (Aref Ruqaa, as the italic is in English), and a
   clean sans for reading. */
:lang(ar) {
  --font-display: "Amiri", "IBM Plex Sans Arabic", serif;
  --font-accent: "Aref Ruqaa", "Amiri", serif;
  --font-body: "IBM Plex Sans Arabic", "DM Sans", system-ui, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--bar-h);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overflow-x: clip;
}

:lang(ar) body,
body:lang(ar) {
  font-size: 18px;
  line-height: 1.85;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

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

.skip {
  position: fixed;
  inset-inline-start: 16px;
  top: 12px;
  z-index: 50;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 200ms var(--ease-out);
}

.skip:focus-visible {
  transform: none;
}

.wrap {
  width: min(1180px, 100%);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ------------------------------------------------------------------ bar */
.bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  height: var(--bar-h);
  padding: 0 var(--gutter);
  padding-top: env(safe-area-inset-top);
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: background-color 300ms ease, border-color 300ms ease, color 300ms ease;
}

.bar.is-scrolled {
  background: color-mix(in srgb, var(--paper) 84%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
  border-bottom-color: var(--line);
}

.is-kiln .bar {
  color: var(--cream);
}

.is-kiln .bar.is-scrolled {
  background: color-mix(in srgb, var(--kiln) 62%, transparent);
  border-bottom-color: rgba(255, 220, 190, 0.1);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-inline-end: auto;
}

.brand img {
  width: auto;
  transition: filter 300ms ease;
}

.brand-mark {
  height: 34px;
}

.brand-word {
  height: 15px;
  margin-top: 2px;
}

.is-kiln .brand img {
  filter: brightness(0) invert(0.94) sepia(0.15);
}

.nav ul {
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a,
.lang {
  position: relative;
  text-decoration: none;
  font-size: 15px;
  color: inherit;
  opacity: 0.82;
  transition: opacity 200ms ease;
}

.lang {
  padding: 7px 14px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 14px;
  opacity: 0.7;
}

.lang:lang(ar) {
  font-family: "IBM Plex Sans Arabic", sans-serif;
}

.lang:lang(en) {
  font-family: "DM Sans", sans-serif;
}

@media (hover: hover) and (pointer: fine) {
  .nav a:hover,
  .lang:hover {
    opacity: 1;
  }
}

/* The way into the store: the one filled control in the bar, on every width
   (the section links fold away on a phone, this one stays). */
.shop {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px 7px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  text-decoration: none;
  transition: transform 160ms var(--ease-out), background-color 300ms ease, color 300ms ease;
}

.shop-ic {
  width: 17px;
  height: 17px;
}

.shop:active {
  transform: scale(0.97);
}

.is-kiln .shop {
  background: var(--cream);
  color: var(--kiln);
}

@media (hover: hover) and (pointer: fine) {
  .shop:hover {
    background: var(--clay-ink);
    color: var(--paper);
  }
}

@media (max-width: 899px) {
  .bar {
    gap: 10px;
  }
}

/* The narrowest phones keep the mark and drop the wordmark beside it, so the
   store and the language buttons never sit on the name. */
@media (max-width: 359px) {
  .brand-word {
    display: none;
  }
}

@media (max-width: 899px) {
  .nav {
    display: none;
  }
}

/* ------------------------------------------------------------- buttons */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  font: 500 16px/1 var(--font-body);
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn .ic {
  width: 20px;
  height: 20px;
}

.btn-solid {
  background: var(--ink);
  color: var(--cream);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
}

@media (hover: hover) and (pointer: fine) {
  .btn-solid:hover {
    background: var(--clay-ink);
  }

  .btn-ghost:hover {
    border-color: var(--ink);
  }
}

/* --------------------------------------------------------------- story */
.story {
  position: relative;
}

.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh;
  overflow: hidden;
  background: var(--paper);
}

.stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 700ms var(--ease-out);
}

.stage-ready .stage canvas {
  opacity: 1;
}

/* the logo stands in until the 3D story is ready, and stays when it cannot run */
.stage-fallback {
  position: absolute;
  top: calc(50% + var(--bar-h) / 2);
  inset-inline-end: 9vw;
  width: min(30vw, 360px);
  transform: translateY(-50%);
  transition: opacity 500ms ease;
}

.stage-ready .stage-fallback {
  opacity: 0;
}

/* in the hero it stands where the dust mark forms, above the words */
.story[data-at="0"] .stage-fallback {
  top: calc(var(--bar-h) + 5vh);
  inset-inline: 0;
  margin-inline: auto;
  width: min(22vw, 240px);
  transform: none;
}

.chapters {
  position: relative;
  z-index: 1;
  margin-top: -100vh;
  margin-top: -100lvh;
  pointer-events: none;
}

.chapter {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--bar-h) + 24px) var(--gutter) 56px;
}

.chapter a,
.card {
  pointer-events: auto;
}

.card {
  max-width: 31rem;
}

.step {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.step span {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0;
  color: var(--clay-ink);
}

.chapter h2 {
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}

:lang(ar) .chapter h2 {
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
}

.chapter .card > p:not(.step):not(.actions) {
  font-size: clamp(18px, 1.5vw, 20px);
  color: var(--ink-2);
  max-width: 28rem;
}

.chapter[data-tone="dark"] {
  color: var(--cream);
}

.chapter[data-tone="dark"] .step,
.chapter[data-tone="dark"] .card > p:not(.step) {
  color: rgba(247, 240, 230, 0.78);
}

.chapter[data-tone="dark"] .step span {
  color: var(--ember);
}

/* the cards arrive as their chapter does: up and in, a beat apart */
.js .chapter:not(.hero) .card > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out);
}

.js .chapter.is-in .card > * {
  opacity: 1;
  transform: none;
}

.js .chapter.is-in .card > :nth-child(2) {
  transition-delay: 70ms;
}

.js .chapter.is-in .card > :nth-child(3) {
  transition-delay: 140ms;
}

.js .chapter.is-in .card > :nth-child(4) {
  transition-delay: 210ms;
}

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
  padding-bottom: clamp(84px, 13vh, 136px);
}

.hero-in {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 62rem;
}

.kicker {
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--clay-ink);
  margin-bottom: 14px;
}

:lang(ar) .kicker {
  letter-spacing: 0;
  font-size: 16px;
}

.hero h1 {
  font-size: clamp(44px, 5.6vw, 84px);
  line-height: 1;
  letter-spacing: -0.015em;
  font-weight: 300;
}

:lang(ar) .hero h1 {
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0;
}

h1 em,
h2 em {
  font-style: italic;
  color: var(--clay);
}

:lang(ar) h1 em,
:lang(ar) h2 em {
  font-family: var(--font-accent);
  font-style: normal;
  font-weight: 700;
}

.chapter[data-tone="dark"] h2 em,
.contact h2 em {
  color: var(--ember);
}

.hero .lead {
  margin: 20px auto 30px;
  max-width: 36rem;
  font-size: clamp(17px, 1.4vw, 19px);
  color: var(--ink-2);
}

.hero .actions {
  justify-content: center;
}

.hint {
  position: absolute;
  bottom: 18px;
  inset-inline: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

:lang(ar) .hint {
  letter-spacing: 0;
  font-size: 13px;
}

.hint i {
  display: block;
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--muted), transparent);
  transform-origin: top;
}

@media (prefers-reduced-motion: no-preference) {
  .hint i {
    animation: hint 2.4s var(--ease-in-out) infinite;
  }

  .hero-in > * {
    animation: rise 900ms var(--ease-out) both;
  }

  .hero-in > :nth-child(2) {
    animation-delay: 80ms;
  }

  .hero-in > :nth-child(3) {
    animation-delay: 160ms;
  }

  .hero-in > :nth-child(4) {
    animation-delay: 240ms;
  }
}

@keyframes hint {
  0% {
    transform: scaleY(0);
    opacity: 1;
  }
  60% {
    transform: scaleY(1);
    opacity: 1;
  }
  100% {
    transform: scaleY(1);
    opacity: 0;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

/* ------------------------------------------------------- finale chapter */
.finale {
  justify-content: center;
  align-items: flex-end;
  text-align: center;
  padding-bottom: clamp(56px, 10vh, 112px);
}

.finale .card {
  max-width: 48rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.finale .card > p:not(.actions) {
  margin-bottom: 26px;
}

/* --------------------------------------------------------------- offer */
.offer,
.about {
  position: relative;
  z-index: 2;
  padding-block: clamp(88px, 12vw, 168px);
}

.offer {
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.sec-head {
  max-width: 40rem;
  margin-bottom: clamp(40px, 6vw, 72px);
}

.sec-head h2,
.about h2,
.contact h2 {
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}

:lang(ar) .sec-head h2,
:lang(ar) .about h2,
:lang(ar) .contact h2 {
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
}

.sec-head p {
  font-size: 19px;
  color: var(--ink-2);
}

.offer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.offer-card {
  display: flex;
  flex-direction: column;
  padding: 34px 30px 30px;
  border-radius: var(--radius);
  background: var(--paper-2);
  border: 1px solid var(--line);
}

.offer-ic {
  width: 44px;
  height: 44px;
  color: var(--clay);
  margin-bottom: 26px;
}

.offer-card h3 {
  font-size: clamp(26px, 2.4vw, 32px);
  line-height: 1.15;
  margin-bottom: 12px;
}

:lang(ar) .offer-card h3 {
  font-weight: 700;
  line-height: 1.5;
}

.offer-card > p {
  color: var(--ink-2);
  margin-bottom: 24px;
}

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

.tags li {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 14px;
  color: var(--ink-2);
}

.offer-shop {
  align-self: flex-start;
  margin-top: 22px;
  font-size: 15px;
  color: var(--clay);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.offer-store {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
  margin-top: 18px;
  padding: 28px 30px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--paper-2);
}

.offer-store p {
  max-width: 36rem;
  font-size: 19px;
  color: var(--ink-2);
}

.offer-store .ic {
  width: 20px;
  height: 20px;
}

@media (max-width: 899px) {
  .offer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --------------------------------------------------------------- about */
.about {
  background: var(--paper-2);
}

.about-in {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(40px, 7vw, 120px);
  align-items: center;
}

.about-text p {
  font-size: clamp(19px, 1.7vw, 23px);
  color: var(--ink-2);
  max-width: 32rem;
}

.about-text p + p {
  margin-top: 14px;
}

.about-text p span[lang="es"] {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.2em;
  color: var(--clay-ink);
}

.about-logo {
  width: min(100%, 380px);
  justify-self: center;
}

@media (max-width: 899px) {
  .about-in {
    grid-template-columns: minmax(0, 1fr);
  }

  .about-logo {
    width: min(70%, 300px);
  }
}

/* ------------------------------------------------------------- contact */
.contact {
  position: relative;
  z-index: 2;
  padding-block: clamp(96px, 13vw, 176px);
  background: radial-gradient(120% 90% at 50% 110%, #3a2216 0%, var(--kiln-2) 45%, var(--kiln) 100%);
  color: var(--cream);
  text-align: center;
}

.contact-in {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-mark {
  width: 96px;
  margin-bottom: 30px;
  opacity: 0.9;
}

.contact .lead {
  max-width: 34rem;
  font-size: clamp(18px, 1.5vw, 20px);
  color: rgba(247, 240, 230, 0.78);
  margin-bottom: 34px;
}

.contact .actions {
  justify-content: center;
}

.contact .btn-solid {
  background: var(--cream);
  color: var(--ink);
}

.contact .btn-ghost {
  color: var(--cream);
  border-color: rgba(247, 240, 230, 0.32);
}

@media (hover: hover) and (pointer: fine) {
  .contact .btn-solid:hover {
    background: var(--ember);
  }

  .contact .btn-ghost:hover {
    border-color: var(--cream);
  }
}

.soon {
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px dashed rgba(247, 240, 230, 0.32);
  color: rgba(247, 240, 230, 0.7);
  font-size: 15px;
}

/* -------------------------------------------------------------- footer */
.foot {
  background: var(--kiln);
  color: rgba(247, 240, 230, 0.66);
  padding-block: 44px calc(44px + env(safe-area-inset-bottom));
  font-size: 15px;
  border-top: 1px solid rgba(255, 220, 190, 0.08);
}

.foot-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
}

.foot-word {
  height: 18px;
  width: auto;
}

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

.foot-social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(247, 240, 230, 0.2);
  color: var(--cream);
  transition: border-color 200ms ease, background-color 200ms ease, transform 160ms var(--ease-out);
}

.foot-social a:active {
  transform: scale(0.95);
}

.foot-social .ic {
  width: 20px;
  height: 20px;
}

@media (hover: hover) and (pointer: fine) {
  .foot-social a:hover {
    border-color: var(--ember);
    background: rgba(255, 164, 92, 0.1);
  }
}

.foot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-inline-start: auto;
}

.foot a {
  color: var(--cream);
  text-decoration-color: rgba(247, 240, 230, 0.35);
  text-underline-offset: 4px;
}

/* ---------------------------------------------------- scroll reveals */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

.js .offer-grid .reveal:nth-child(2) {
  transition-delay: 80ms;
}

.js .offer-grid .reveal:nth-child(3) {
  transition-delay: 160ms;
}

/* ---------------------------------------------------------------- phone */
@media (max-width: 899px) {
  :root {
    --bar-h: 60px;
  }

  .brand-mark {
    height: 30px;
  }

  .brand-word {
    height: 13px;
  }

  .chapter:not(.hero):not(.finale) {
    align-items: flex-end;
    padding-bottom: calc(28px + env(safe-area-inset-bottom));
  }

  .chapter:not(.hero) .card {
    width: 100%;
    max-width: none;
    padding: 22px 22px 24px;
    border-radius: 22px;
    background: color-mix(in srgb, var(--paper) 80%, transparent);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 18px 40px -24px rgba(42, 34, 29, 0.35);
  }

  .chapter[data-tone="dark"] .card {
    background: color-mix(in srgb, var(--kiln) 66%, transparent);
    box-shadow: 0 1px 0 rgba(255, 220, 190, 0.08) inset;
  }

  .chapter h2 {
    font-size: clamp(34px, 9vw, 44px);
    margin-bottom: 10px;
  }

  .step {
    margin-bottom: 10px;
  }

  .stage-fallback {
    top: 22%;
    inset-inline: 0;
    margin-inline: auto;
    width: min(56vw, 260px);
  }

  .hero {
    padding-bottom: calc(40px + env(safe-area-inset-bottom));
  }

  .hint {
    display: none;
  }

  .hero .lead {
    margin: 14px auto 24px;
  }

  .foot-meta {
    margin-inline-start: 0;
  }
}

/* ------------------------------------------------------ reduced motion */
@media (prefers-reduced-motion: reduce) {
  .js .chapter:not(.hero) .card > *,
  .js .reveal {
    transform: none;
    transition: opacity 400ms ease;
  }

  .hint i {
    animation: none;
  }
}
