/* Kunthea · Web & AI Studio
   One stylesheet for kunthea.ai and kunthea.ai/hi. Mobile first.
   Colours and type come from the brand pack (brand-pack/index.html). */

@font-face {
  font-family: "Bodoni Moda";
  src: url("assets/fonts/BodoniModa-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #120D12;
  --surface: #1A121A;
  --hairline: #35282F;
  --text: #EEE8E4;
  --muted: #B0A7A9;
  --label: #968D90;
  --pearl: #D9D0CC;

  --font-display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --font-body: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;

  --gutter: 20px;
  --bar-h: 64px;
  --measure: 35rem;
  --ease: cubic-bezier(.25, .6, .3, 1);
  --dur: .25s;

  color-scheme: dark;
}

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-h) + 16px);
}

body {
  background: var(--bg);
  color: var(--muted);
  font: 300 1.0625rem/1.7 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

/* One soft fade when the page opens, only for people who are fine with motion */
@media (prefers-reduced-motion: no-preference) {
  body { animation: fade-in .7s var(--ease) both; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

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

ul { list-style: none; padding: 0; }

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

p { text-wrap: pretty; }

::selection { background: var(--pearl); color: var(--bg); }

/* Links: hairline underline that brightens */
a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .28em;
  text-decoration-color: var(--label);
  transition: color var(--dur) var(--ease), text-decoration-color var(--dur) var(--ease), background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
a:hover { text-decoration-color: var(--pearl); }

:focus-visible {
  outline: 1px solid var(--pearl);
  outline-offset: 4px;
}
:focus:not(:focus-visible) { outline: none; }
main:focus { outline: none; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: 10px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  background: var(--surface);
  border: 1px solid var(--pearl);
  color: var(--pearl);
  font: 400 .75rem/1 var(--font-body);
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* ---------- Brand lockup: Kunthea◆ | WEB & AI STUDIO ---------- */

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--pearl);
  text-decoration: none;
}

.brand__name {
  display: inline-flex;
  align-items: baseline;
  font: 400 1.5rem/1 var(--font-display);    /* 24px */
  letter-spacing: .03em;
  color: var(--pearl);
}

/* The diamond after the final a: small, on the baseline, like a full stop */
.diamond {
  width: .25em;
  height: .25em;
  margin-left: .09em;
  fill: currentColor;
  flex: none;
  transform: translateY(.04em);
}

/* The single hairline between the name and the descriptor (brand pack, horizontal lockup) */
.brand__rule {
  flex: none;
  width: 1px;
  height: 1.75rem;
  margin: 0 14px 0 16px;
  background: var(--label);
}

.brand__desc {
  font: 400 .625rem/1.5 var(--font-body);    /* 10px */
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--label);
}

/* Narrow phones: the descriptor breaks onto two short lines beside the hairline */
@media (max-width: 379px) {
  .brand__desc { letter-spacing: .2em; }
  .brand__rule { margin: 0 12px 0 14px; }
}

/* ---------- Top bar ---------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--bar-h);
  padding: 10px var(--gutter);
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: transform .35s var(--ease), border-color var(--dur) var(--ease);
}
.bar.is-scrolled { border-bottom-color: var(--hairline); }
.bar.is-hidden { transform: translateY(-100%); }

/* Menu without JavaScript (or before it runs): a plain row of links */
.menu ul {
  display: flex;
  gap: 4px 20px;
  flex-wrap: wrap;
}
.menu a {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-height: 44px;
  padding: 12px 0;
  font: 400 .875rem/1.4 var(--font-body);
  letter-spacing: .04em;
  color: var(--muted);
  text-decoration: none;
}
.menu__n {
  font-size: .6875rem;
  letter-spacing: .08em;
  color: var(--label);
}
.menu a:hover,
.menu a[aria-current="true"] { color: var(--pearl); }
.menu a:hover .menu__n,
.menu a[aria-current="true"] .menu__n { color: var(--pearl); }

.burger,
.menu__close { display: none; }

.scrim { display: none; }

/* Without JavaScript the bar wraps: brand on the first line, links below */
@media (max-width: 1023px) {
  html:not(.js) .bar { flex-wrap: wrap; position: static; }
  html:not(.js) .menu { width: 100%; border-top: 1px solid var(--hairline); }
}

/* ---------- Phone and tablet menu panel (JavaScript on, below 1024 px) ---------- */

@media (max-width: 1023px) {
  .js .burger,
  .js .menu__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-right: -10px;
    color: var(--pearl);
  }
  .burger svg,
  .menu__close svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.3;
    stroke-linecap: round;
  }

  .js .menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    width: min(78vw, 340px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border-left: 1px solid var(--hairline);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .35s var(--ease), visibility 0s linear .35s;
  }
  .js .menu__close {
    position: absolute;
    top: 10px;
    right: calc(var(--gutter) - 0px);
    margin-right: -10px;
  }
  .js .menu ul {
    display: block;
    text-align: center;
  }
  .js .menu li + li { margin-top: 18px; }
  .js .menu a {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 160px;
    padding: 10px 16px;
  }
  .js .menu__n { font-size: .75rem; }
  .js .menu__t {
    font: 400 1.5rem/1.2 var(--font-display);
    letter-spacing: .02em;
    color: var(--text);
  }
  .js .menu a:hover .menu__t,
  .js .menu a[aria-current="true"] .menu__t { color: var(--pearl); }

  .js .scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgb(18 13 18 / .72);          /* --bg at 72% */
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s var(--ease), visibility 0s linear .35s;
  }

  .menu-open,
  .menu-open body { overflow: hidden; }
  .menu-open .menu,
  .menu-open .scrim {
    visibility: visible;
    transition-delay: 0s;
  }
  .menu-open .menu { transform: none; }
  .menu-open .scrim { opacity: 1; }
}

/* ---------- Content ---------- */

.content {
  display: block;
  max-width: calc(40rem + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding-top: 64px; }
#about { padding-top: 32px; }

.eyebrow {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  font: 400 .75rem/1.4 var(--font-body);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--label);
}
.eyebrow__n { color: var(--pearl); letter-spacing: .12em; }
.eyebrow__n::after {
  content: "";
  display: inline-block;
  width: 24px;
  margin: 0 14px;
  vertical-align: middle;
  border-top: 1px solid var(--hairline);
}

h1,
h2 {
  font-size: clamp(2rem, 1.55rem + 1.9vw, 2.625rem);   /* 32 to 42px */
  line-height: 1.12;
  letter-spacing: .01em;
  margin-bottom: 36px;
  max-width: 16em;
}

.prose { max-width: var(--measure); }
.prose p + p { margin-top: 1.15em; }

/* Portrait: the original photo, unchanged, in a hairline mount */
.portrait {
  width: 100%;
  max-width: 360px;
  margin-bottom: 40px;
  padding: 10px;
  border: 1px solid var(--hairline);
}
.portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--surface);
}

/* ---------- Work: browser and phone mockup, then the facts ---------- */

.project {
  display: grid;
  gap: 40px;
}

/* The mockup keeps a fixed shape, so nothing moves while the images load */
.mock {
  position: relative;
  width: 100%;
  aspect-ratio: 100 / 80;
}

.browser {
  position: absolute;
  top: 0;
  left: 0;
  width: 88%;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  background: var(--surface);
}
.browser__bar {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding: 0 8px;
  border-bottom: 1px solid var(--hairline);
}
.browser__bar i {
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--hairline);
}
.browser__url { display: none; }
.browser img {
  width: 100%;
  aspect-ratio: 1440 / 900;
  background: var(--bg);
}

/* A phone drawn in CSS: rounded body, even bezel, island, side button.
   Percentages keep the proportions the same at every size. */
.phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 26%;
  padding: 1.2%;                            /* about 4.5% of the phone width: padding % follows the mockup width */
  border: 1px solid var(--label);
  border-radius: 16% / 7.6%;
  background: var(--bg);
  outline: 5px solid var(--bg);             /* a clean gap where it overlaps the browser */
}
.phone::after {                             /* side button */
  content: "";
  position: absolute;
  right: -3px;
  top: 24%;
  width: 2px;
  height: 11%;
  border-radius: 0 2px 2px 0;
  background: var(--label);
}
.phone__screen {
  position: relative;
  overflow: hidden;
  border-radius: 12.6% / 5.8%;
  background: var(--surface);
}
.phone__screen::before {                    /* island */
  content: "";
  position: absolute;
  top: 2.4%;
  left: 50%;
  z-index: 1;
  width: 30%;
  aspect-ratio: 10 / 3;
  border-radius: 999px;
  background: var(--bg);
  transform: translateX(-50%);
}
.phone__screen img {
  width: 100%;
  aspect-ratio: 390 / 844;
}

/* Project facts: label and value on one line, hairlines between */
.facts { max-width: var(--measure); }

.facts__list { border-top: 1px solid var(--hairline); }
.facts__list > div {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px solid var(--hairline);
}
.facts__list dt {
  font: 400 .6875rem/1.5 var(--font-body);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--label);
}
.facts__list dd {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
}
.facts__list #bellini-name {
  font: 400 1.25rem/1.3 var(--font-display);
  letter-spacing: .02em;
}

.facts__lead {
  margin-top: 28px;
  color: var(--text);
}
.facts p + p { margin-top: 1em; }
.facts .facts__link { margin-top: 22px; }

.arrow-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 12px 0;
  font: 400 .75rem/1.4 var(--font-body);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--pearl);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
}
@media (max-width: 399px) {
  .arrow-link { letter-spacing: .1em; }
}
.arrow-link:hover { border-bottom-color: var(--pearl); }
.arrow {
  flex: none;
  width: 10px; height: 10px;
  margin-left: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  transition: transform var(--dur) var(--ease);
}
.arrow-link:hover .arrow { transform: translate(2px, -2px); }

/* ---------- Contact ---------- */

.section--contact { padding-top: 88px; }

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

/* Outline button: 1px pearl, no fill, spaced caps */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 15px 24px;
  border: 1px solid var(--pearl);
  background: transparent;
  color: var(--pearl);
  font: 400 .75rem/1.2 var(--font-body);
  letter-spacing: .2em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
}
.btn:hover { background: var(--pearl); color: var(--bg); }
.btn:active { background: var(--text); border-color: var(--text); color: var(--bg); }

/* Email address button: keep the address in normal case so it reads correctly */
.btn--mail { text-transform: none; letter-spacing: .03em; font-size: .875rem; }

/* Phones: buttons stack at full width, easy to tap */
@media (max-width: 599px) {
  .actions { flex-direction: column; }
  .btn { width: 100%; }
}

/* ---------- Contact icons: a row above the footer on every screen size ---------- */

.social {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 88px;
}
.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--muted);
}
.social a:hover { color: var(--pearl); }
.icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--dur) var(--ease);
}
.social a:hover .icon { transform: translateY(-2px); }


/* ---------- Footer: a quiet footnote ---------- */

.foot {
  padding: 24px var(--gutter) 40px;
  text-align: center;
  font: 400 .75rem/1.7 var(--font-body);
  letter-spacing: .06em;
  color: var(--label);
}

/* ---------- Larger phones and tablets ---------- */

@media (min-width: 600px) {
  :root { --gutter: 40px; --bar-h: 72px; }

  .brand__name { font-size: 1.625rem; }
  .brand__desc { font-size: .6875rem; }

  .section { padding-top: 96px; }
  #about { padding-top: 48px; }

  .browser__bar { height: 26px; gap: 6px; padding: 0 11px; }
  .browser__bar i { width: 7px; height: 7px; }
  .browser__url {
    display: block;
    flex: 1;
    margin-right: 30px;                     /* balances the three dots */
    font: 400 .6875rem/1 var(--font-body);
    letter-spacing: .06em;
    text-align: center;
    color: var(--label);
  }
  .phone { outline-width: 7px; }

  .section--contact { padding-top: 120px; }
}

/* ---------- Desktop ---------- */

@media (min-width: 1024px) {
  :root { --gutter: 48px; --bar-h: 80px; --rail: clamp(112px, 10vw, 152px); }

  body { font-size: 1.125rem; }

  .bar { padding: 12px 40px; }
  .menu ul { gap: 0 36px; }
  .menu a { font-size: .875rem; }

  .content {
    max-width: calc(1000px + 2 * var(--rail));
    padding: 0 var(--rail);
  }
  .section { padding-top: 120px; }
  #about { padding-top: 64px; }

  /* About: story on the left, portrait on the right */
  .about {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 64px;
    align-items: start;
  }
  .about .portrait {
    grid-column: 2;
    grid-row: 1;
    margin: 6px 0 0;
  }
  .about .prose { grid-column: 1; grid-row: 1; }

  .project { gap: 48px; }
  .mock { max-width: 680px; }
  .facts__list dd { font-size: 1rem; }
  .facts p:not(.facts__lead):not(.facts__link) { font-size: 1rem; }

  .section--contact { padding-top: 140px; text-align: center; }
  .section--contact .eyebrow { justify-content: center; }
  .section--contact h2 { margin-left: auto; margin-right: auto; }
  .actions { justify-content: center; }


  .foot { margin-top: 140px; padding-bottom: 48px; }
}

/* Wide screens: mockup on the left, facts on the right */
@media (min-width: 1200px) {
  .project {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 56px;
    align-items: center;
  }
}

@media (min-width: 1440px) {
  :root { --rail: 160px; }
}

/* ---------- The /hi links page ---------- */

.hi {
  max-width: 30rem;
  margin: 0 auto;
  padding: 64px var(--gutter) 40px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.hi__main { flex: 1 0 auto; display: flex; flex-direction: column; }
.hi .brand-h { font-size: 1rem; }
.hi .brand { min-height: 0; }
.hi .brand__name { font-size: 2.5rem; }
.hi .brand__rule { height: 2.5rem; margin: 0 16px 0 18px; }
.hi .brand__desc { font-size: .6875rem; }

.tagline {
  margin-top: 32px;
  font: 400 1.3125rem/1.35 var(--font-display);   /* 21px */
  letter-spacing: .01em;
  color: var(--text);
}
.place {
  margin-top: 4px;
  font-size: .9375rem;
  line-height: 1.5;
  color: var(--muted);
}

.links {
  margin-top: 40px;
  border-top: 1px solid var(--hairline);
}
.links a {
  display: grid;
  grid-template-columns: 6.5rem 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px 4px 10px 0;
  border-bottom: 1px solid var(--hairline);
  text-decoration: none;
  color: var(--text);
}
.links__k {
  font: 400 .6875rem/1.4 var(--font-body);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--label);
  transition: color var(--dur) var(--ease);
}
.links__v { font-size: 1.0625rem; }
.links .arrow { width: 11px; height: 11px; color: var(--label); }
.links a:hover .links__k,
.links a:hover .arrow { color: var(--pearl); }
.links a:hover .arrow { transform: translate(2px, -2px); }
.links a:hover .arrow--in { transform: translate(2px, 0); }
.links a:focus-visible { outline-offset: 2px; }

.hi__spacer { flex: 1 0 64px; }       /* pushes the footer to the bottom */
.hi .foot { margin-top: 0; padding: 24px 0 0; }

@media (max-width: 359px) {
  .hi .brand__name { font-size: 2.125rem; }
  .hi .brand__rule { margin: 0 12px 0 14px; }
  .links a { grid-template-columns: 5.5rem 1fr auto; }
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .bar.is-hidden { transform: none; }
}

/* /hi page: stacked lockup (name, short hairline, descriptor), like the brand pack and the card */
.hi .brand { flex-direction: column; align-items: flex-start; }
.hi .brand__name { font-size: 2.5rem; }
.hi .brand__rule { width: 48px; height: 1px; margin: 16px 0 14px; }
.hi .brand__desc { font-size: .6875rem; white-space: nowrap; }
