/* AhoosAI — ahoos-ai.site
 *
 * Restrained on purpose. The visual language is type, space and one rule
 * weight; there are no gradients, no glass, no glow and no cards with shadows.
 * What carries the page is measure, hierarchy and the amount of nothing
 * between things.
 *
 * Direction is handled with logical properties throughout -- margin-inline,
 * padding-inline, border-inline, inset-inline. Setting dir="rtl" on <html>
 * then mirrors the layout for real rather than only moving the text, which is
 * the difference between a Persian site and an English one with Persian words
 * in it.
 */

/* ---- tokens -------------------------------------------------------------- */
:root{
  --paper:#fbfaf9;
  --paper-2:#f4f2f0;
  --ink:#16150f;
  --ink-2:#3d3b34;
  --muted:#75726a;
  --line:#e2dfda;
  --line-2:#cdc9c2;
  --accent:#1b4dd8;

  --sans-en:"Inter","Segoe UI",-apple-system,BlinkMacSystemFont,Helvetica,Arial,sans-serif;
  --sans-fa:"Vazirmatn","Segoe UI",Tahoma,Arial,sans-serif;
  --sans:var(--sans-en);
  --mono:"Cascadia Mono",Consolas,"SF Mono",Menlo,monospace;

  --measure:1180px;
  --gap:clamp(20px,4vw,40px);
  --header-h:66px;
}
/* One switch changes the type for the whole document. */
html[lang="fa"]{ --sans:var(--sans-fa); }

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth;scroll-padding-top:calc(var(--header-h) + 16px)}
body{
  margin:0;background:var(--paper);color:var(--ink);
  font-family:var(--sans);font-size:17px;line-height:1.65;
  font-feature-settings:"kern" 1;
  -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;
}
html[lang="fa"] body{line-height:1.9}
img{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:2px}

.wrap{max-width:var(--measure);margin-inline:auto;padding-inline:clamp(20px,5vw,44px)}
.skip{position:absolute;inset-inline-start:-9999px;top:0;z-index:200;background:var(--ink);
      color:var(--paper);padding:12px 18px}
.skip:focus{inset-inline-start:0}

h1,h2,h3,h4{margin:0;font-weight:600;letter-spacing:-.022em;line-height:1.18}
html[lang="fa"] h1,html[lang="fa"] h2,html[lang="fa"] h3,html[lang="fa"] h4{letter-spacing:0;line-height:1.4}
p{margin:0}

/* ---- header -------------------------------------------------------------- */
.site-header{
  position:sticky;top:0;z-index:100;background:rgba(251,250,249,.86);
  backdrop-filter:saturate(180%) blur(12px);
  border-block-end:1px solid transparent;transition:border-color .2s ease;
}
.site-header[data-scrolled="true"]{border-block-end-color:var(--line)}
.header-inner{display:flex;align-items:center;gap:18px;height:var(--header-h)}
.brand{display:inline-flex;align-items:center;gap:9px;
        font-size:18px;font-weight:640;letter-spacing:-.03em;white-space:nowrap}
/* The mark keeps its own direction: the A does not face the other way in
   Persian, and the gap beside it is logical so the word still follows. */
.brand .mark{width:26px;height:26px;flex-shrink:0;direction:ltr}
.footer-brand .brand .mark{width:22px;height:22px}
html[lang="fa"] .brand{letter-spacing:0}

.primary-nav{margin-inline-start:auto;display:flex;align-items:center;gap:2px}
.primary-nav a{padding:8px 11px;font-size:14.5px;color:var(--ink-2);border-radius:6px;
                transition:color .15s ease,background-color .15s ease;white-space:nowrap}
.primary-nav a:hover{color:var(--ink);background:var(--paper-2)}

.header-tools{display:flex;align-items:center;gap:10px;margin-inline-start:14px}
.lang{display:flex;border:1px solid var(--line-2);border-radius:7px;overflow:hidden}
.lang button{padding:5px 10px;font-size:12.5px;font-weight:560;color:var(--muted);
             letter-spacing:.03em;transition:.15s}
.lang button[aria-pressed="true"]{background:var(--ink);color:var(--paper)}
.lang button:not([aria-pressed="true"]):hover{background:var(--paper-2);color:var(--ink)}

.tg{width:34px;height:34px;border:1px solid var(--line-2);border-radius:7px;
    display:grid;place-items:center;color:var(--ink-2);transition:.15s}
.tg:hover{border-color:var(--ink);color:var(--ink)}
.menu-btn{display:none;width:36px;height:36px;place-items:center}

/* ---- hero ---------------------------------------------------------------- */
/* Tall on purpose: the assembly is tied to how far this section has been
   scrolled, so it needs room to happen in. */
.hero{position:relative;height:300vh}
.hero-sticky{position:sticky;top:0;height:100vh;display:grid;place-items:center;overflow:hidden}
.hero-inner{position:relative;width:min(760px,86vw);text-align:center}

.hero-stage{position:relative;width:min(420px,72vw);aspect-ratio:1;margin-inline:auto}
/* The wordmark and the assembled mark occupy the same square. One fades out as
   the other comes together, so nothing moves to make room. */
.hero-word{position:absolute;inset:0;display:grid;place-items:center;
           font-size:clamp(38px,8.4vw,74px);font-weight:640;letter-spacing:-.04em;
           white-space:nowrap;will-change:opacity,transform}
html[lang="fa"] .hero-word{letter-spacing:-.02em}
.hero-logo{position:absolute;inset:0;direction:ltr}
/* Each tile carries the same image, offset so together they are the original
   picture exactly. Nothing is redrawn, so the end state cannot drift from the
   asset. */
.tile{position:absolute;background-image:var(--logo);background-repeat:no-repeat;
      will-change:transform,opacity;backface-visibility:hidden}

.hero-tagline{margin-block-start:clamp(26px,5vh,52px);font-size:clamp(16px,2.1vw,20px);
              color:var(--ink-2);max-width:46ch;margin-inline:auto;
              opacity:0;transform:translateY(12px);transition:opacity .7s ease,transform .7s ease}
.hero-tagline.in{opacity:1;transform:none}
.hero-hint{position:absolute;inset-inline:0;bottom:clamp(20px,5vh,44px);text-align:center;
           font-size:12.5px;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);
           transition:opacity .4s ease}
html[lang="fa"] .hero-hint{letter-spacing:0;text-transform:none}

/* ---- sections ------------------------------------------------------------ */
section{padding-block:clamp(72px,11vh,132px);border-block-start:1px solid var(--line)}
.section-head{max-width:62ch;margin-block-end:clamp(38px,6vh,64px)}
.section-head h2{font-size:clamp(28px,4.4vw,46px)}
.section-head p{margin-block-start:14px;color:var(--muted);font-size:clamp(16px,2vw,19px)}

/* reveal on approach -- one transition, no library */
.reveal{opacity:0;transform:translateY(16px);
        transition:opacity .65s cubic-bezier(.22,.8,.28,1),transform .65s cubic-bezier(.22,.8,.28,1)}
.reveal.in{opacity:1;transform:none}

/* ---- news ---------------------------------------------------------------- */
.article{display:block;padding-block:clamp(30px,4.5vh,44px);border-block-start:1px solid var(--line)}
.article:first-child{border-block-start:0;padding-block-start:0}
.article-meta{display:flex;gap:14px;align-items:center;font-size:13px;color:var(--muted);
              margin-block-end:14px;flex-wrap:wrap}
.article-meta .cat{text-transform:uppercase;letter-spacing:.11em;font-size:11.5px;font-weight:640;
                   color:var(--ink-2)}
html[lang="fa"] .article-meta .cat{text-transform:none;letter-spacing:0}
.article-meta time{font-variant-numeric:tabular-nums}
.article h3{font-size:clamp(22px,3vw,30px);max-width:24ch}
.article.feature h3{font-size:clamp(28px,4.6vw,46px);max-width:20ch}
.article p{margin-block-start:14px;color:var(--ink-2);max-width:60ch;font-size:16.5px}
.article.feature p{font-size:clamp(17px,2.2vw,20px);max-width:56ch}
.article .more{display:inline-flex;align-items:center;gap:7px;margin-block-start:18px;
               font-size:14.5px;font-weight:560;color:var(--accent)}
.article .more .arw{transition:transform .2s ease}
a.article:hover h3{text-decoration:underline;text-underline-offset:5px;
                   text-decoration-thickness:1px}
a.article:hover .more .arw{transform:translateX(4px)}
/* The arrow points the way the language reads. */
html[dir="rtl"] .more .arw{transform:scaleX(-1)}
html[dir="rtl"] a.article:hover .more .arw{transform:scaleX(-1) translateX(4px)}

/* ---- about --------------------------------------------------------------- */
.statement{max-width:34ch;font-size:clamp(24px,3.6vw,38px);line-height:1.35;font-weight:500;
           letter-spacing:-.02em}
html[lang="fa"] .statement{line-height:1.75;letter-spacing:0;max-width:38ch}
.statement + .statement{margin-block-start:clamp(56px,9vh,104px)}
.statement h2{font-size:13px;font-weight:640;letter-spacing:.14em;text-transform:uppercase;
              color:var(--muted);margin-block-end:22px}
html[lang="fa"] .statement h2{letter-spacing:0;text-transform:none;font-size:15px}

/* ---- models -------------------------------------------------------------- */
.model{padding-block:clamp(28px,4vh,40px);border-block-start:1px solid var(--line);
       display:grid;gap:clamp(14px,3vw,44px);grid-template-columns:minmax(0,20ch) minmax(0,1fr)}
.model:first-of-type{border-block-start:0}
.model-id h3{font-size:19px}
.model-id .ver{margin-block-start:6px;font-family:var(--mono);font-size:12.5px;color:var(--muted)}
.model-id .state{margin-block-start:10px;font-size:12.5px;color:var(--muted);
                 display:inline-flex;align-items:center;gap:7px}
.model-id .dot{width:6px;height:6px;border-radius:50%;background:var(--line-2)}
.model-id .state[data-status="available"] .dot{background:#2f7d46}
.model-id .state[data-status="development"] .dot{background:#b07d1e}
.model-body .purpose{font-size:17.5px;font-weight:560;margin-block-end:10px}
.model-body p{color:var(--ink-2);max-width:62ch}
.model-body dl{margin:18px 0 0;display:grid;gap:10px;grid-template-columns:minmax(0,14ch) minmax(0,1fr);
               font-size:14.5px}
.model-body dt{color:var(--muted)}
.model-body dd{margin:0;color:var(--ink-2)}

/* ---- products ------------------------------------------------------------ */
.product{display:block;padding-block:clamp(28px,4vh,40px);border-block-start:1px solid var(--line)}
.product:first-of-type{border-block-start:0}
.product .row{display:flex;align-items:baseline;gap:14px;flex-wrap:wrap}
.product h3{font-size:clamp(22px,3vw,30px)}
.product .state{font-size:12.5px;color:var(--muted)}
.product p{margin-block-start:12px;color:var(--ink-2);max-width:60ch}
.product .more{display:inline-flex;align-items:center;gap:7px;margin-block-start:16px;
               font-size:14.5px;font-weight:560;color:var(--accent)}
a.product:hover h3{text-decoration:underline;text-underline-offset:5px;text-decoration-thickness:1px}
a.product:hover .more .arw{transform:translateX(4px)}
html[dir="rtl"] a.product:hover .more .arw{transform:scaleX(-1) translateX(4px)}

/* ---- footer -------------------------------------------------------------- */
.site-footer{border-block-start:1px solid var(--line);padding-block:clamp(48px,8vh,80px);
             background:var(--paper-2)}
.footer-grid{display:grid;gap:clamp(30px,5vw,64px);
             grid-template-columns:minmax(0,1.4fr) repeat(3,minmax(0,1fr))}
.footer-brand .brand{font-size:17px}
.footer-brand p{margin-block-start:10px;color:var(--muted);font-size:14px;max-width:30ch}
.footer-col h4{font-size:12.5px;font-weight:640;letter-spacing:.12em;text-transform:uppercase;
               color:var(--muted);margin-block-end:14px}
html[lang="fa"] .footer-col h4{letter-spacing:0;text-transform:none;font-size:14px}
.footer-col a{display:block;padding-block:6px;font-size:14.5px;color:var(--ink-2)}
.footer-col a:hover{color:var(--ink)}
.footer-base{margin-block-start:clamp(36px,6vh,58px);padding-block-start:24px;
             border-block-start:1px solid var(--line-2);display:flex;gap:16px;flex-wrap:wrap;
             align-items:center;font-size:13.5px;color:var(--muted)}
.footer-base .sp{margin-inline-start:auto}

/* ---- responsive ---------------------------------------------------------- */
@media (max-width:900px){
  .footer-grid{grid-template-columns:1fr 1fr}
  .footer-brand{grid-column:1 / -1}
  .model{grid-template-columns:1fr;gap:16px}
  .model-body dl{grid-template-columns:minmax(0,12ch) minmax(0,1fr)}
}
@media (max-width:760px){
  body{font-size:16px}
  .menu-btn{display:grid}
  .primary-nav{
    position:fixed;inset:var(--header-h) 0 auto;flex-direction:column;align-items:stretch;
    gap:0;background:var(--paper);border-block-end:1px solid var(--line);
    padding:10px clamp(20px,5vw,44px) 18px;margin:0;
    display:none;max-height:calc(100vh - var(--header-h));overflow-y:auto;
  }
  .primary-nav[data-open="true"]{display:flex}
  .primary-nav a{padding:13px 4px;font-size:16px;border-block-end:1px solid var(--line)}
  .primary-nav a:last-child{border-block-end:0}
  .header-tools{margin-inline-start:auto}
  /* Shorter runway: on a phone the whole assembly should be done within a
     couple of flicks rather than needing a long scroll. */
  .hero{height:220vh}
}
@media (max-width:460px){
  .footer-grid{grid-template-columns:1fr}
  .model-body dl{grid-template-columns:1fr;gap:4px}
  .model-body dt{margin-block-start:8px}
}

/* ---- reduced motion ------------------------------------------------------
   Not "less animation" -- no animation, and the end state instead. The hero
   collapses to its finished frame and stops being scroll-driven, so nobody has
   to scroll three screens to read the page. */
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation-duration:.001ms !important;animation-iteration-count:1 !important;
                       transition-duration:.001ms !important}
  .hero{height:auto}
  .hero-sticky{position:static;height:auto;padding-block:clamp(60px,14vh,120px)}
  .hero-hint{display:none}
  .reveal,.hero-tagline{opacity:1;transform:none}
}

@media print{
  .site-header,.hero-hint,.menu-btn,.lang{display:none}
  body{background:#fff}
  .hero{height:auto}
  .hero-sticky{position:static;height:auto}
}
