/* ==========================================================================
   ARQLÁNTICO — design tokens
   Ink (graphite-blue) + Paper (warm stone) + Brass + Blueprint
   Display: Instrument Serif (italic) · Body: Inter · Labels: IBM Plex Mono
   ========================================================================== */

:root{
  --ink:        #12151A;
  --ink-soft:   #1B1F26;
  --ink-line:   #333844;
  --paper:      #EFEBE2;
  --paper-2:    #E5E0D3;
  --graphite:   #2A2D33;
  --graphite-60:#5B5F68;
  --stone-line: #D6CFBE;
  --brass:      #A9824C;
  --brass-light:#C9A56E;
  --blueprint:  #33505F;

  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "SF Mono", Consolas, monospace;

  --container: 1220px;
  --gutter: clamp(24px, 5vw, 72px);
  --ease: cubic-bezier(.16,.8,.24,1);
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *,*::before,*::after{ animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

body{
  margin:0;
  background: var(--paper);
  color: var(--graphite);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }

::selection{ background: var(--brass); color: var(--paper); }

/* subtle paper grain overlay */
.grain{
  position: fixed; inset:0; pointer-events:none; z-index: 999;
  opacity: .035; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- typography helpers ---------- */
.eyebrow{
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 18px;
  display:flex; align-items:center; gap:10px;
}
.eyebrow::before{
  content:""; width:22px; height:1px; background: var(--brass);
}
.eyebrow--light{ color: var(--brass-light); }

.h2{
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.06;
  letter-spacing: -.01em;
  margin: 0 0 24px;
  color: var(--ink);
}
.h2--light{ color: var(--paper); }

.body{ font-size: 16px; color: var(--graphite-60); max-width: 46ch; }

/* ---------- buttons ---------- */
.btn{
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 15px 28px;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
  white-space: nowrap;
}
.btn--solid{
  background: var(--brass);
  color: var(--ink);
  border: 1px solid var(--brass);
}
.btn--solid:hover{ background: var(--brass-light); border-color: var(--brass-light); transform: translateY(-1px); }
.btn--ghost{
  border: 1px solid rgba(255,255,255,.35);
  color: inherit;
}
.btn--ghost:hover{ border-color: var(--brass); color: var(--brass); }

/* ==========================================================================
   NAV
   ========================================================================== */
.nav{
  position: fixed; top:0; left:0; right:0; z-index: 500;
  display:flex; align-items:center; justify-content: space-between;
  padding: 22px var(--gutter);
  color: var(--paper);
  transition: background .4s var(--ease), padding .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled{
  background: rgba(18,21,26,.86);
  backdrop-filter: blur(10px);
  padding: 14px var(--gutter);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.nav__mark{ display:flex; align-items:center; gap:10px; }
.nav__compass{ width:26px; height:26px; flex-shrink:0; }
.nav__word{
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.nav__links{ display:flex; gap:36px; }
.nav__links a{
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .85;
  position: relative;
  padding-bottom: 3px;
}
.nav__links a::after{
  content:""; position:absolute; left:0; right:100%; bottom:0; height:1px;
  background: var(--brass); transition: right .3s var(--ease);
}
.nav__links a:hover{ opacity: 1; }
.nav__links a:hover::after{ right:0; }

.lang-switch{
  display:flex; align-items:center; gap:2px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 2px;
  padding: 3px;
  margin-right: 4px;
}
.lang-switch__btn{
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .03em;
  color: inherit;
  opacity: .6;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 1px;
  transition: opacity .25s, background .25s, color .25s;
  line-height: 1;
}
.lang-switch__btn:hover{ opacity: .9; }
.lang-switch__btn.is-active{
  opacity: 1;
  background: var(--brass);
  color: var(--ink);
}

.nav__cta{
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.35);
  padding: 10px 18px;
  border-radius: 2px;
  transition: border-color .3s, color .3s;
}
.nav__cta:hover{ border-color: var(--brass); color: var(--brass); }

.nav__burger{
  display:none; background:none; border:none; cursor:pointer; width:26px; height:20px;
  position: relative; padding:0;
}
.nav__burger span{
  position:absolute; left:0; right:0; height:1px; background: currentColor;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav__burger span:first-child{ top:2px; }
.nav__burger span:last-child{ bottom:2px; }
.nav__burger[aria-expanded="true"] span:first-child{ transform: translateY(8px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child{ transform: translateY(-9px) rotate(-45deg); }

.mobile-menu{
  position: fixed; inset:0; z-index: 400;
  background: var(--ink); color: var(--paper);
  display:flex; flex-direction:column; align-items:flex-start; justify-content:center;
  gap: 22px; padding: var(--gutter);
  transform: translateY(-100%);
  transition: transform .5s var(--ease);
}
.mobile-menu.is-open{ transform: translateY(0); }
.mobile-menu a{
  font-family: var(--serif); font-style: italic; font-size: 34px;
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero{
  position: relative;
  height: 100svh;
  min-height: 640px;
  display:flex; flex-direction: column; justify-content: flex-end;
  overflow:hidden;
  background: var(--ink);
}
.hero__carousel{
  position:absolute; inset:0; width:100%; height:100%;
}
.hero__img{
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 2.8s ease-in-out, transform 9s ease-out;
}
.hero__img.is-active{
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero__scrim{
  position:absolute; inset:0;
  background:
    linear-gradient(180deg, rgba(18,21,26,.55) 0%, rgba(18,21,26,.25) 32%, rgba(18,21,26,.55) 68%, rgba(18,21,26,.92) 100%);
}

.hero__grid{
  position: relative; z-index: 2;
  padding: 0 var(--gutter) 96px;
  max-width: 900px;
}
.hero__eyebrow{ color: var(--brass-light); }
.hero__title{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 8.6vw, 104px);
  line-height: .98;
  letter-spacing: -.01em;
  color: var(--paper);
  margin: 0 0 26px;
}
.hero__title em{ font-style: italic; color: var(--brass-light); }
.hero__sub{
  font-size: clamp(16px, 1.5vw, 19px);
  color: rgba(239,235,226,.82);
  max-width: 52ch;
  margin: 0 0 40px;
}
.hero__actions{ display:flex; gap:16px; flex-wrap: wrap; }

.hero__meta{
  position: relative; z-index:2;
  display:flex; justify-content: space-between; align-items:center;
  padding: 20px var(--gutter);
  border-top: 1px solid rgba(255,255,255,.14);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(239,235,226,.55);
}
.hero__scroll{ display:flex; align-items:center; gap:8px; }
.hero__scroll::after{
  content:""; width:1px; height:20px; background: var(--brass);
  animation: scrollLine 1.8s ease-in-out infinite;
}
@keyframes scrollLine{ 0%,100%{ transform: scaleY(.3); opacity:.4;} 50%{ transform: scaleY(1); opacity:1;} }

/* ==========================================================================
   REVEAL ANIMATION
   ========================================================================== */
[data-reveal]{
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
[data-reveal].is-visible{ opacity:1; transform: translateY(0); }
.hero__grid [data-reveal]{ transition-delay: .1s; }

/* ==========================================================================
   STUDIO
   ========================================================================== */
.studio{ padding: 140px var(--gutter); max-width: var(--container); margin: 0 auto; }
.studio__grid{
  display:grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.studio__text{ max-width: 480px; }
.studio__lede{
  font-family: var(--serif); font-style: italic; font-size: 22px;
  color: var(--ink); line-height:1.5; max-width: 40ch; margin: 0 0 22px;
}
.studio__text .body{ margin-bottom: 40px; }

.studio__stats{
  display:grid; gap: 18px;
  border-top: 1px solid var(--stone-line);
  padding-top: 24px;
  margin:0;
}
.studio__stats div{
  display:grid; grid-template-columns: 130px 1fr; gap: 16px;
  padding-bottom: 16px; border-bottom: 1px solid var(--stone-line);
}
.studio__stats div:last-child{ border-bottom:none; padding-bottom:0; }
.studio__stats dt{
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brass);
}
.studio__stats dd{ margin:0; font-size: 14px; color: var(--graphite); }

.studio__media{ position: relative; }
.studio__media img{
  width:100%; aspect-ratio: 20/9.2; object-fit: cover; border-radius: 2px;
}
.studio__media-cap{
  position:absolute; left:20px; bottom:20px;
  background: var(--ink); color: var(--paper);
  font-family: var(--serif); font-style: italic; font-size: 17px;
  padding: 10px 18px;
}

/* ==========================================================================
   PROCESS
   ========================================================================== */
.process{
  position: relative;
  background: var(--ink);
  color: var(--paper);
  padding: 140px var(--gutter) 120px;
  overflow: hidden;
}
.process__bg{
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  opacity: .16;
  filter: saturate(.7);
}
.process__scrim{
  position:absolute; inset:0;
  background: linear-gradient(180deg, var(--ink) 0%, rgba(18,21,26,.88) 40%, var(--ink) 100%);
}
.process__head, .process__diagram{ position: relative; z-index: 2; }
.process__head{ max-width: 720px; margin: 0 auto 90px; text-align:center; }
.process__head .eyebrow{ justify-content:center; }
.process__head .h2{ text-align:center; }
.process__lede{ color: rgba(239,235,226,.68); font-size: 17px; margin: 0 auto; max-width: 58ch; }

.process__diagram{ max-width: var(--container); margin: 0 auto; }
.process__svg{ width:100%; height: 40px; display:block; }
.process__baseline{ stroke: var(--ink-line); stroke-width:1; }
.process__line{
  stroke: var(--brass); stroke-width:1;
  stroke-dasharray: 1120;
  stroke-dashoffset: 1120;
  transition: stroke-dashoffset 1.6s var(--ease);
}
.process__line.is-drawn{ stroke-dashoffset: 0; }

.process__steps{
  display:grid; grid-template-columns: repeat(4,1fr); gap: 32px;
  margin-top: -10px;
}
.process__step{ position:relative; padding-top: 26px; }
.process__node{
  position:absolute; top:-6px; left:0; width:9px; height:9px; border-radius:50%;
  background: var(--brass);
  box-shadow: 0 0 0 4px var(--ink), 0 0 0 5px var(--ink-line);
}
.process__num{
  display:block; font-family: var(--mono); font-size: 12px; color: var(--brass);
  letter-spacing: .08em; margin-bottom: 14px;
}
.process__step h3{
  font-family: var(--serif); font-style: italic; font-weight:400;
  font-size: 22px; margin: 0 0 10px; color: var(--paper);
}
.process__step p{ font-size: 14px; color: rgba(239,235,226,.6); margin:0; line-height:1.55; }

/* ==========================================================================
   SERVICES
   ========================================================================== */
.services{ padding: 140px var(--gutter); max-width: var(--container); margin:0 auto; }
.services__head{ max-width: 640px; margin-bottom: 70px; }
.services__lede{ font-size: 17px; color: var(--graphite-60); max-width: 56ch; }

.services__grid{
  display:grid; grid-template-columns: repeat(3, 1fr); gap: 3px;
  background: var(--stone-line);
  border: 1px solid var(--stone-line);
}
.card{
  background: var(--paper);
  display:flex; flex-direction:column;
  overflow:hidden;
}
.card--wide{ grid-column: span 2; flex-direction: row; }
.card--wide .card__media{ width: 46%; flex-shrink:0; }
.card--wide .card__body{ width: 54%; }

.card--dark{ background: var(--ink); color: var(--paper); }
.card--dark .card__body h3{ color: var(--paper); }
.card--dark .card__body p{ color: rgba(239,235,226,.65); }
.card--dark .card__tag{ color: var(--brass-light); }

.card__media{ position: relative; overflow:hidden; aspect-ratio: 4/3; background: var(--ink); }
.card__media img,
.card__media video{
  position: absolute; inset:0;
  width:100%; height:100%; object-fit:cover;
  opacity: 0;
  transition: opacity 2.2s ease-in-out, transform .7s var(--ease);
}
.card__media img.is-active,
.card__media video.is-active{ opacity: 1; z-index: 1; }
.card:hover .card__media img.is-active,
.card:hover .card__media video.is-active{ transform: scale(1.05); }

.card__body{ padding: 28px 30px 32px; display:flex; flex-direction:column; flex:1; }
.card__tag{
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--brass); margin-bottom: 14px;
}
.card__body h3{
  font-family: var(--sans); font-weight:600; font-size: 18px;
  margin: 0 0 12px; color: var(--ink); letter-spacing: -.01em;
}
.card__body p{ font-size: 14px; color: var(--graphite-60); margin:0; line-height:1.6; }

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact{ position: relative; padding: 160px var(--gutter) 120px; overflow:hidden; }
.contact__img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.contact__scrim{
  position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(18,21,26,.88), rgba(18,21,26,.94));
}
.contact__inner{ position:relative; z-index:2; max-width: 720px; }
.contact__lede{ color: rgba(239,235,226,.72); font-size: 17px; max-width: 54ch; margin: 0 0 44px; }
.contact__row{ display:flex; gap:16px; flex-wrap:wrap; margin-bottom: 80px; }

.contact__meta{
  display:grid; grid-template-columns: repeat(3,1fr); gap: 28px;
  border-top: 1px solid rgba(255,255,255,.14); padding-top: 30px;
}
.contact__meta p{ margin: 8px 0 0; font-size: 14px; color: rgba(239,235,226,.75); }
.contact__meta a{ border-bottom: 1px solid rgba(255,255,255,.3); }
.contact__meta a:hover{ color: var(--brass-light); border-color: var(--brass-light); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer{ background: var(--ink); color: rgba(239,235,226,.5); padding: 30px var(--gutter) 40px; }
.footer .nav__mark{ color: var(--paper); margin-bottom: 14px; }
.footer__row{
  display:flex; justify-content: space-between; align-items:flex-end; flex-wrap: wrap; gap: 16px;
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px;
}
.footer__row p{ margin:0; font-family: var(--mono); font-size: 12px; letter-spacing: .03em; }

/* ==========================================================================
   CJK (Chinese) TYPOGRAPHY OVERRIDE
   Instrument Serif / IBM Plex Mono have no CJK glyphs — swap to Noto Sans SC
   for headings, labels and body text whenever Chinese is the active language.
   ========================================================================== */
html.lang-zh body{ font-family: "Noto Sans SC", var(--sans); }
html.lang-zh .h2,
html.lang-zh .hero__title,
html.lang-zh .studio__lede,
html.lang-zh .studio__media-cap,
html.lang-zh .process__step h3,
html.lang-zh .mobile-menu a{
  font-family: "Noto Sans SC", var(--sans);
  font-style: normal;
  font-weight: 600;
}
html.lang-zh .hero__title em{ font-style: normal; }
html.lang-zh .eyebrow,
html.lang-zh .nav__word,
html.lang-zh .nav__links a,
html.lang-zh .nav__cta,
html.lang-zh .lang-switch__btn,
html.lang-zh .card__tag,
html.lang-zh .btn,
html.lang-zh .process__num,
html.lang-zh .footer__row p{
  font-family: "Noto Sans SC", var(--sans);
  letter-spacing: normal;
}

/* ==========================================================================
   RTL (Arabic) LAYOUT + TYPOGRAPHY
   ========================================================================== */
html[dir="rtl"] body{ font-family: "Noto Kufi Arabic", var(--sans); }
html.lang-ar .h2,
html.lang-ar .hero__title,
html.lang-ar .studio__lede,
html.lang-ar .studio__media-cap,
html.lang-ar .process__step h3,
html.lang-ar .mobile-menu a{
  font-family: "Noto Kufi Arabic", var(--sans);
  font-style: normal;
  font-weight: 600;
}
html.lang-ar .hero__title em{ font-style: normal; color: var(--brass-light); }
html.lang-ar .eyebrow,
html.lang-ar .nav__word,
html.lang-ar .nav__links a,
html.lang-ar .nav__cta,
html.lang-ar .lang-switch__btn,
html.lang-ar .card__tag,
html.lang-ar .btn,
html.lang-ar .process__num,
html.lang-ar .footer__row p{
  font-family: "Noto Kufi Arabic", var(--sans);
  letter-spacing: normal;
}
/* mirror the few explicitly-positioned (non-flex) elements */
html[dir="rtl"] .eyebrow::before{ order: 2; }
html[dir="rtl"] .studio__media-cap{ left: auto; right: 20px; }
html[dir="rtl"] .process__steps{ direction: rtl; }
html[dir="rtl"] .contact__meta{ text-align: right; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 980px){
  .nav__links{ display:none; }
  .nav__cta{ display:none; }
  .nav__burger{ display:block; color: inherit; }

  .studio__grid{ grid-template-columns: 1fr; }

  .process__steps{ grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .process__svg{ display:none; }

  .services__grid{ grid-template-columns: 1fr 1fr; }
  .card--wide{ grid-column: span 2; flex-direction: column; }
  .card--wide .card__media, .card--wide .card__body{ width:100%; }
  .card--wide .card__media{ aspect-ratio: 4/3; }

  .contact__meta{ grid-template-columns: 1fr; }
}

@media (max-width: 620px){
  .services__grid{ grid-template-columns: 1fr; }
  .card--wide{ grid-column: span 1; }
  .process__steps{ grid-template-columns: 1fr; }
  .hero__meta{ flex-direction: column; align-items:flex-start; gap:10px; }
  .studio__stats div{ grid-template-columns: 100px 1fr; }
  .lang-switch__btn{ padding: 5px 7px; font-size: 11px; }
  .nav__word{ display:none; }
}
