/* QuaintInc — site styles
   Values are taken 1:1 from the Claude Design prototypes (1440px desktop canvas).
   Mobile breakpoint: below 760px. */

/* ---------- Fonts (self-hosted, Latin subset, SIL Open Font License) ---------- */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-italic-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/newsreader-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('/fonts/jost-latin.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  --ivory: #F6F2EB;
  --ink: #1A1714;
  --body: #3A342E;
  --lead: #2B2621;
  --muted: #8A8379;
  --number: #A39B90;
  --rule: #DDD6CB;
  --rule-email: #C9C0B3;
  --fill: #E8DFD2;
  --selection: #E4DACB;

  --serif: 'Cormorant Garamond', 'Cormorant', Garamond, 'Times New Roman', serif;
  --news: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Jost', 'Futura', 'Helvetica Neue', Arial, sans-serif;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--ink); }
a:focus-visible, button:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
::selection { background: var(--selection); }
img { display: block; max-width: 100%; }
em { font-style: italic; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, p { margin: 0; }
h1, h2 { font-weight: inherit; }

.visually-hidden {
  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-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 14px; background: var(--ivory); border: 1px solid var(--ink);
  font-size: 11px; font-weight: 500; letter-spacing: 0.22em;
}
.skip-link:focus { top: 16px; }

.page {
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  min-height: 100vh;
  overflow-x: hidden;
}
.page--stack { display: flex; flex-direction: column; }

/* Image frames: placeholder fill until an image is supplied; images fill + crop */
.frame { background: var(--fill); overflow: hidden; }
.frame > img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }

/* Responsive variant switching (Home uses separate desktop / mobile compositions) */
@media (max-width: 759px) { .only-desktop { display: none !important; } }
@media (min-width: 760px) { .only-mobile { display: none !important; } }

/* Shared bits */
.arrow { flex: none; }
.link-arrow {
  display: inline-flex;
  align-items: center;
  font-weight: 500;
  letter-spacing: 0.24em;
  transition: opacity .3s;
}
.link-arrow:hover { opacity: 0.55; }
.link-arrow__text { border-bottom: 1px solid var(--ink); }

.dash { display: inline-block; width: 34px; height: 1px; background: var(--muted); flex: none; }

/* ---------- Header ---------- */
.site-header {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(20px, 2.6vw, 38px) clamp(24px, 5.6vw, 80px) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.wordmark {
  font-family: var(--news);
  font-size: clamp(30px, 3.4vw, 48px);
  line-height: 1;
  letter-spacing: -0.01em;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px clamp(18px, 4.3vw, 62px);
  font-size: clamp(9.5px, 0.8vw, 11px);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.nav a { transition: opacity .3s; }
.nav a:hover { opacity: 0.5; }
.nav a[aria-current="page"] { padding-bottom: 4px; border-bottom: 1px solid var(--ink); }
.nav a[aria-current="page"]:hover { opacity: 1; }

/* Home header: fixed 11px nav on desktop, MENU button on mobile */
.nav--home { flex-wrap: nowrap; gap: clamp(28px, 4.3vw, 62px); font-size: 11px; }
.menu-button {
  background: none;
  border: none;
  padding: 12px 0 12px 12px;
  min-height: 44px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--ink);
  cursor: pointer;
}
@media (max-width: 759px) { .nav--home { display: none; } }
@media (min-width: 760px) { .menu-button { display: none; } }

/* Mobile menu overlay */
.menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--ivory);
  display: flex;
  flex-direction: column;
  padding: 20px 24px 32px;
  overflow-y: auto;
}
.menu[hidden] { display: none; }
@media (min-width: 760px) { .menu { display: none; } }
.menu__top { display: flex; justify-content: space-between; align-items: center; }
.menu__wordmark { font-family: var(--news); font-size: 30px; line-height: 1; }
.menu__nav {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 48px;
  line-height: 1.1;
}
.menu__foot {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--muted);
}
html.menu-open, html.menu-open body { overflow: hidden; }

/* ---------- Home: hero (desktop) ---------- */
.hero { position: relative; }
.hero__sky {
  position: absolute;
  right: 0;
  top: min(20vw, 288px);
  width: min(7.9vw, 114px);
  height: min(13.3vw, 191px);
}
.hero__inner {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(24px, 6.15vw, 88px) min(5vw, 72px);
  min-height: min(60vw, 865px);
}
.hero__book {
  position: absolute;
  left: 53%;
  top: min(3.1vw, 45px);
  width: 18.3%;
  height: min(19.5vw, 280px);
}
.hero__disciplines {
  position: absolute;
  left: 75.4%;
  top: min(6.3vw, 90px);
  display: flex;
  flex-direction: column;
  gap: min(0.45vw, 7px);
  font-size: clamp(9px, 0.95vw, 12px);
  letter-spacing: 0.22em;
  color: var(--muted);
  line-height: 1.5;
}
.hero__vline {
  position: absolute;
  left: 75.9%;
  top: min(27.8vw, 400px);
  width: 1px;
  height: min(31.7vw, 457px);
  background: var(--rule);
}
.hero__counter {
  position: absolute;
  left: 92.6%;
  top: min(42.5vw, 612px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: min(1.6vw, 22px);
  font-size: clamp(9px, 0.95vw, 12px);
  letter-spacing: 0.08em;
  color: var(--ink);
}
.hero__counter-line { width: 1px; height: min(5vw, 72px); background: var(--muted); }
.hero__text { position: relative; max-width: 72%; padding-top: min(7.4vw, 106px); }
.eyebrow {
  font-size: clamp(9px, 0.95vw, 12px);
  letter-spacing: 0.3em;
  color: var(--muted);
  text-transform: uppercase;
}
.hero__title {
  margin-top: min(3vw, 43px);
  font-family: var(--serif);
  font-weight: 400;
  font-size: min(9.6vw, 138px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.hero__lead {
  margin-top: min(3.2vw, 46px);
  max-width: 30em;
  font-family: var(--news);
  font-size: clamp(17px, 1.85vw, 26px);
  line-height: 1.4;
  color: var(--lead);
}
.hero__cta {
  margin-top: min(4.2vw, 60px);
  gap: min(3.2vw, 44px);
  font-size: clamp(10px, 1.05vw, 13px);
}
.hero__cta .link-arrow__text { padding-bottom: 9px; }
.hero__cta .arrow { margin-bottom: 9px; }

/* ---------- Home: hero (mobile) ---------- */
.hero-m { padding: 56px 24px 72px; }
.hero-m .eyebrow { font-size: 10px; letter-spacing: 0.28em; }
.hero-m__title {
  margin-top: 22px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(50px, 15.5vw, 92px);
  line-height: 0.96;
  letter-spacing: -0.02em;
}
.hero-m__lead {
  margin-top: 26px;
  font-family: var(--news);
  font-size: 19px;
  line-height: 1.42;
  color: var(--lead);
  text-wrap: pretty;
}
.hero-m__cta { margin-top: 34px; gap: 28px; font-size: 11px; min-height: 44px; }
.hero-m__cta .link-arrow__text { padding-bottom: 8px; }
.hero-m__cta .arrow { margin-bottom: 8px; }
.hero-m__media {
  margin-top: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.hero-m__book { aspect-ratio: 187 / 200; }
.hero-m__side { display: flex; flex-direction: column; gap: 36px; }
.hero-m__disciplines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 9.5px;
  letter-spacing: 0.22em;
  color: var(--muted);
  line-height: 1.5;
}
.hero-m__sky { margin-right: -24px; aspect-ratio: 4 / 5; }

/* ---------- Home: selected work ---------- */
.work {
  max-width: 1440px;
  margin: 0 auto;
  padding: min(4vw, 56px) clamp(24px, 6.25vw, 90px) 0;
  scroll-margin-top: 24px;
}
.work__head { display: flex; justify-content: space-between; align-items: center; padding-bottom: min(1.6vw, 22px); }
.section-label { font-size: clamp(10px, 1vw, 13px); font-weight: 500; letter-spacing: 0.24em; }

.project + .project { border-top: 1px solid var(--rule); }
.project__link {
  display: grid;
  grid-template-columns: minmax(0, 94fr) minmax(0, 533fr) minmax(0, 250fr) 24px;
  align-items: center;
  min-height: min(7.3vw, 106px);
}
.project__number {
  font-family: var(--news);
  font-size: clamp(14px, 1.6vw, 22px);
  color: var(--number);
  transition: color .4s;
}
.project__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: min(3.7vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  transition: transform .6s var(--ease);
}
.project__category {
  font-size: clamp(9px, 0.95vw, 12px);
  letter-spacing: 0.26em;
  color: var(--muted);
  text-transform: uppercase;
}
.project__arrow { justify-self: end; transition: transform .5s var(--ease); }

@media (min-width: 760px) {
  .project__link:hover .project__number,
  .project__link:focus-visible .project__number { color: var(--ink); }
  .project__link:hover .project__title,
  .project__link:focus-visible .project__title { transform: translateX(10px); }
  .project__link:hover .project__arrow,
  .project__link:focus-visible .project__arrow { transform: translateX(6px); }
}

@media (max-width: 759px) {
  .project__link {
    grid-template-columns: 36px minmax(0, 1fr) 20px;
    column-gap: 8px;
    row-gap: 8px;
    padding: 22px 0;
    min-height: 0;
  }
  .project__number { grid-column: 1; grid-row: 1; font-size: 15px; }
  .project__title { grid-column: 2; grid-row: 1; font-size: 34px; line-height: 1.05; letter-spacing: -0.01em; }
  .project__arrow { grid-column: 3; grid-row: 1; }
  .project__category { grid-column: 2 / 4; grid-row: 2; font-size: 9.5px; letter-spacing: 0.24em; }
}

/* ---------- Home: about teaser (desktop) ---------- */
.about-teaser {
  max-width: 1440px;
  margin: 0 auto;
  padding: min(7.5vw, 108px) clamp(24px, 6.25vw, 90px) 0;
  display: grid;
  grid-template-columns: minmax(0, 264fr) minmax(0, 381fr) minmax(0, 251fr);
  scroll-margin-top: 24px;
}
.about-teaser__image {
  margin-left: calc(-1 * min(2vw, 28px));
  width: min(15vw, 216px);
  height: min(16.8vw, 242px);
}
.about-teaser__statement {
  padding-right: min(3vw, 40px);
  font-family: var(--serif);
  font-weight: 400;
  font-size: min(4.4vw, 63px);
  line-height: 1.16;
  letter-spacing: -0.015em;
}
.about-teaser__aside {
  border-left: 1px solid var(--rule);
  padding: min(0.3vw, 4px) 0 min(1vw, 14px) min(4.9vw, 70px);
  display: flex;
  flex-direction: column;
}
.about-teaser__rule {
  display: block;
  width: min(3.3vw, 46px);
  height: 1px;
  background: var(--muted);
  margin: min(2.2vw, 30px) 0 min(3.4vw, 48px);
}
.about-teaser__body {
  font-size: clamp(13px, 1.35vw, 18px);
  font-weight: 300;
  line-height: 1.62;
  color: var(--body);
  text-wrap: pretty;
}
.about-teaser__link {
  margin-top: min(4vw, 56px);
  align-self: flex-start;
  gap: min(2.4vw, 34px);
  font-size: clamp(10px, 1vw, 13px);
}
.about-teaser__link .link-arrow__text { padding-bottom: 8px; }
.about-teaser__link .arrow { margin-bottom: 8px; }

/* ---------- Home: about teaser (mobile) ---------- */
.about-m { padding: 88px 24px 0; scroll-margin-top: 16px; }
.about-m__image { width: 52%; aspect-ratio: 154 / 172; margin-left: -8px; }
.about-m__statement {
  margin-top: 40px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 10.5vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.015em;
}
.about-m__aside { margin-top: 44px; padding-top: 32px; border-top: 1px solid var(--rule); }
.about-m__aside .section-label { font-size: 11px; }
.about-m__body { margin-top: 22px; font-size: 16px; font-weight: 300; line-height: 1.62; color: var(--body); }
.about-m__link { margin-top: 28px; gap: 28px; min-height: 44px; font-size: 11px; }
.about-m__link .link-arrow__text { padding-bottom: 8px; }
.about-m__link .arrow { margin-bottom: 8px; }

/* ---------- Contact ---------- */
.contact {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(96px, 11vw, 160px) clamp(24px, 6.25vw, 90px) 0;
  scroll-margin-top: 24px;
}
.contact__inner {
  border-top: 1px solid var(--rule);
  padding-top: clamp(40px, 5vw, 72px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(32px, 5vw, 72px);
  align-items: end;
}
.contact__label {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: clamp(10px, 1vw, 12px);
  letter-spacing: 0.26em;
  color: var(--muted);
}
.contact__title {
  margin-top: clamp(20px, 2.4vw, 34px);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 6.2vw, 90px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.contact__title--flush { margin-top: 0; }
.contact__body { padding-bottom: 6px; }
.contact__text { font-size: clamp(14px, 1.35vw, 18px); font-weight: 300; line-height: 1.62; color: var(--body); }
.contact__email {
  margin-top: 18px;
  display: inline-block;
  font-family: var(--news);
  font-size: clamp(26px, 2.8vw, 40px);
  line-height: 1.2;
  border-bottom: 1px solid var(--rule-email);
  transition: border-color .3s, opacity .3s;
  overflow-wrap: anywhere;
}
.contact__email:hover { border-color: var(--ink); }
/* About page variant: ink underline, fades on hover */
.contact__email--ink { border-bottom-color: var(--ink); }
.contact__email--ink:hover { opacity: 0.55; }

/* About page contact sits inside <main> with its own padding */
.contact--about {
  max-width: none;
  margin: 0;
  padding: clamp(88px, 10vw, 150px) clamp(24px, 6.15vw, 88px) clamp(64px, 7vw, 100px);
}

/* ---------- Footer ---------- */
.site-footer {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(24px, 6vw, 86px) clamp(28px, 3vw, 44px);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px 32px;
  font-size: clamp(9.5px, 0.9vw, 11px);
  letter-spacing: 0.24em;
  color: var(--muted);
}
.site-footer--home { padding-top: clamp(96px, 10vw, 150px); gap: 18px 32px; }
.site-footer__brand { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.site-footer__name { color: var(--ink); font-weight: 500; }
.site-footer__end { display: flex; align-items: center; gap: 32px; }
.site-footer__copy { letter-spacing: 0.12em; }
.back-to-top {
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  transition: opacity .3s;
}
.back-to-top:hover { opacity: 0.55; }

/* ---------- About page ---------- */
.about-main, .soon-main { flex: 1; width: 100%; max-width: 1440px; margin: 0 auto; }
.about-hero {
  padding: clamp(64px, 9vw, 130px) clamp(24px, 6.15vw, 88px) 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(48px, 6vw, 88px);
  align-items: end;
}
.about-hero__text { max-width: 680px; }
.page-label {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: clamp(10px, 0.95vw, 12px);
  letter-spacing: 0.3em;
  color: var(--muted);
  text-transform: uppercase;
}
.about-hero__title {
  margin-top: clamp(24px, 3vw, 43px);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(42px, 5.2vw, 76px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.media-col {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: clamp(28px, 4.9vw, 70px);
}
.media-col__rule { width: 1px; background: var(--rule); flex: none; }
.about-hero__portrait { width: min(100%, 360px); aspect-ratio: 4 / 5; }
@media (max-width: 759px) { .about-hero__portrait { width: 58%; } }

.practice {
  padding: clamp(72px, 9vw, 130px) clamp(24px, 6.15vw, 88px) 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(32px, 6vw, 88px);
}
.practice__copy { display: flex; flex-direction: column; gap: clamp(20px, 2vw, 28px); }
.practice__lead {
  font-family: var(--news);
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.38;
  color: var(--lead);
  text-wrap: pretty;
}
.practice__body {
  font-size: clamp(15px, 1.35vw, 18px);
  font-weight: 300;
  line-height: 1.62;
  color: var(--body);
  text-wrap: pretty;
}
.practice__label { margin: 0 0 clamp(18px, 2vw, 28px); font-size: clamp(10px, 0.95vw, 12px); letter-spacing: 0.3em; color: var(--muted); }
.makes { border-top: 1px solid var(--rule); }
.makes li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.makes__name { font-family: var(--serif); font-size: clamp(26px, 2.4vw, 34px); line-height: 1.1; }
.makes__kind { font-size: 11px; letter-spacing: 0.24em; color: var(--muted); text-align: right; }

/* ---------- Coming Soon / 404 ---------- */
.soon-main {
  padding: clamp(64px, 9vw, 130px) clamp(24px, 6.15vw, 88px) clamp(48px, 6vw, 88px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(48px, 6vw, 88px);
  align-items: center;
}
.soon__text { max-width: 640px; }
.soon__title {
  margin-top: clamp(24px, 3vw, 43px);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(56px, 8.4vw, 122px);
  line-height: 0.96;
  letter-spacing: -0.02em;
}
.soon__lead {
  margin-top: clamp(22px, 3vw, 44px);
  font-family: var(--news);
  font-size: clamp(19px, 1.85vw, 26px);
  line-height: 1.4;
  color: var(--lead);
}
.soon__back {
  margin-top: clamp(32px, 4.2vw, 60px);
  gap: 22px;
  min-height: 44px;
  font-size: clamp(10px, 1.05vw, 13px);
}
.soon__back .link-arrow__text { padding-bottom: 8px; }
.soon__back .arrow { margin-bottom: 8px; }
.soon__image { width: min(100%, 300px); aspect-ratio: 154 / 172; }

/* ---------- Gentle reveals (only when JS is running; never with reduced motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .6s ease-out, transform .6s ease-out;
  }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}

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