/* Graftco. Section order after mountfortmedia.com; house rules from the taste skill. */

:root {
  /* palette (brand) */
  --bg: #F4F2ED;          /* Limestone, the ground */
  --surface: #D8D4CC;     /* Mortar, one tone step */
  --ink: #1C2230;         /* Ink, all running text */
  --muted: #4F6B92;       /* Steel, secondary notes on Limestone only */
  --field: #14234A;       /* Graftco Navy */
  --field-ink: #F4F2ED;
  --accent: #A8845A;      /* Aged Brass, the action */
  --accent-strong: #967347;
  --accent-ink: #1C2230;

  --font-display: "EB Garamond", "Iowan Old Style", Georgia, serif;
  --font-text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* five sizes */
  --step-display: clamp(3rem, 6.4vw, 6.5rem);
  --step-head: clamp(2.25rem, 4vw, 3.75rem);
  --step-statement: clamp(1.375rem, 1.9vw, 1.75rem);
  --step-nav: 1.1875rem;
  --step-body: 1.125rem;

  --margin: clamp(1.25rem, 3vw, 3rem);
  --gutter: clamp(1rem, 2vw, 2rem);
  --section: clamp(6rem, 11vw, 10rem);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-text); font-size: var(--step-body); line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, p, figure, ul, ol, dl, dd { margin: 0; }
ul[role="list"], ol[role="list"] { padding: 0; list-style: none; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--field); color: var(--field-ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nums { font-variant-numeric: tabular-nums lining-nums; }
.muted { color: var(--muted); }
.wrap { padding-inline: var(--margin); }

/* type */
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; text-wrap: balance; }
.head { font-size: var(--step-head); line-height: 1.02; letter-spacing: -0.02em; }
.statement { font-family: var(--font-display); font-weight: 400; font-size: var(--step-statement); line-height: 1.25; letter-spacing: -0.005em; }
p { text-wrap: pretty; max-width: 62ch; }

/* controls */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 3.1rem; padding: 0 1.6rem; background: var(--accent); color: var(--accent-ink); font-weight: 500; text-decoration: none; white-space: nowrap; transition: background-color 180ms ease; }
.button--navy { background: var(--field); color: var(--field-ink); }
.link { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.25em; text-decoration-thickness: 0.07em; transition: text-decoration-color 180ms ease; }
@media (hover: hover) and (pointer: fine) {
  .button:hover { background-color: var(--accent-strong); }
  .button--navy:hover { background-color: #1d3163; }
  .link:hover { text-decoration-color: currentColor; }
}

/* ---------- hero: one full-screen photo, the nav on top of it ---------- */
.hero { position: relative; height: 100svh; min-height: 620px; color: var(--field-ink); isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; }
.hero__picture { position: absolute; inset: 0; z-index: -1; background: var(--field); overflow: clip; }
.hero__picture::after { content: ""; position: absolute; inset: 0; background: rgba(20, 35, 74, 0.34); }
.hero__picture img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }

.nav { display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 3rem; padding-block: clamp(1rem, 2.2vw, 1.75rem); }
.nav__logo { width: clamp(200px, 19.5vw, 280px); height: auto; }
.nav__links { justify-self: end; display: flex; gap: clamp(2rem, 3.6vw, 3.5rem); font-size: var(--step-nav); }
.nav__menu { display: none; }

.hero__copy { padding-bottom: clamp(2.5rem, 7svh, 5rem); }
.hero__title { font-size: var(--step-display); line-height: 0.98; letter-spacing: -0.03em; }
.hero__actions { display: flex; align-items: center; gap: 2rem; margin-top: 2rem; }
.hero__link { display: inline-flex; align-items: center; gap: 0.45rem; text-decoration-color: currentColor; }

/* ---------- intro ---------- */
.intro { padding-top: var(--section); }
.intro__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 1.25rem; }
.intro__head h2 { grid-column: 1 / 9; }
.intro__lead { grid-column: 1 / 7; display: grid; gap: 1.5rem; justify-items: start; }
.intro__split { margin-top: clamp(2.5rem, 5vw, 4rem); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: end; }
.intro__photo { grid-column: 1 / 9; aspect-ratio: 3 / 2; overflow: clip; background: var(--surface); }
.intro__photo img, .intro__photo2 img { width: 100%; height: 100%; object-fit: cover; }
.intro__side { grid-column: 9 / 13; display: grid; gap: 1.5rem; }
.intro__photo2 { aspect-ratio: 6 / 7; overflow: clip; background: var(--surface); }

/* ---------- services: tabs and the curved gallery ---------- */
.services { margin-top: var(--section); padding-block: clamp(4rem, 7vw, 6rem) clamp(3rem, 5vw, 4.5rem); overflow: clip; background: var(--surface); }
.services__tabs { display: flex; justify-content: center; gap: clamp(1.75rem, 3vw, 3rem); }
.services__tab { font-size: var(--step-nav); color: var(--ink); padding-block: 0.4rem; position: relative; transition: color 180ms ease; }
.services__tab[aria-selected="true"] { color: var(--field); font-weight: 500; }
.services__tab[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -0.15rem; height: 3px; background: var(--accent); }
@media (hover: hover) and (pointer: fine) { .services__tab:hover { color: var(--field); } }
.services__panel { animation: fade-in 320ms ease; }
.services__copy { text-align: center; display: grid; justify-items: center; gap: 1.1rem; margin-top: 2rem; }
.services__copy p { max-width: 40ch; }

.arc { margin-top: clamp(0.5rem, 1.5vw, 1.5rem); }
.arc__stage { position: relative; height: clamp(380px, 36vw, 560px); perspective: 1000px; perspective-origin: 50% 50%; overflow: clip; touch-action: pan-y; cursor: grab; user-select: none; }
.arc.is-dragging .arc__stage { cursor: grabbing; }
.arc__track { position: absolute; inset: 0; transform-style: preserve-3d; }
.arc__card { position: absolute; top: 50%; left: 50%; width: var(--card-w, 180px); aspect-ratio: 4 / 5; margin: calc(var(--card-w, 180px) * -0.625) 0 0 calc(var(--card-w, 180px) * -0.5); overflow: clip; background: var(--bg); backface-visibility: hidden; }
.arc__card img, .arc__video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.arc__controls { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1rem; }
.arc__step { width: 48px; height: 48px; display: grid; place-items: center; background: var(--field); color: var(--field-ink); font-size: 1.25rem; transition: background-color 180ms ease; }
@media (hover: hover) and (pointer: fine) { .arc__step:hover { background: #1d3163; } }
/* without script: a plain row the visitor can scroll sideways */
html:not(.js) .arc__stage { height: auto; perspective: none; overflow-x: auto; }
html:not(.js) .arc__track { position: static; display: flex; gap: 1rem; padding-inline: var(--margin); }
html:not(.js) .arc__card { position: static; margin: 0; flex: 0 0 220px; }
html:not(.js) .arc__controls { display: none; }

/* ---------- process: how we work ---------- */
.process { margin-top: var(--section); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: start; }
.process__intro { grid-column: 1 / 5; display: grid; gap: 1.25rem; justify-items: start; }
.process__steps { grid-column: 6 / 13; display: grid; gap: clamp(2rem, 3.5vw, 3rem); }
.process__steps li { display: grid; grid-template-columns: minmax(8rem, 0.38fr) 1fr; column-gap: var(--gutter); align-items: baseline; }
.process__steps p { color: var(--ink); }

/* ---------- morning on site ---------- */
.morning { margin-top: var(--section); background: var(--field); color: var(--field-ink); padding-block: clamp(5rem, 9vw, 8rem); }
.morning__top { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: end; }
.morning__top > div:first-child { grid-column: 1 / 7; display: grid; gap: 1rem; }
.morning__facts { grid-column: 8 / 13; display: grid; gap: 0.9rem; }
.morning__facts div { display: grid; grid-template-columns: 4.5rem 1fr; align-items: baseline; column-gap: 1rem; }
.morning__facts dt { font-family: var(--font-display); font-size: var(--step-head); line-height: 1; }
.morning__frame { position: relative; margin-top: clamp(2.5rem, 5vw, 4rem); aspect-ratio: 16 / 9; overflow: clip; background: #0e1830; }
.morning__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 360ms ease; }
.morning__img.is-active { opacity: 1; }
.morning__caption { margin-top: 1.1rem; display: flex; gap: 1.25rem; align-items: baseline; max-width: none; }
.morning__time { font-weight: 500; min-width: 4.5em; }
.morning__strip-wrap { margin-top: 1.5rem; display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; }
.morning__strip { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 0.6rem; touch-action: pan-y; }
.morning__thumb { display: grid; gap: 0.45rem; width: 100%; text-align: left; opacity: 0.5; transition: opacity 200ms ease; }
.morning__thumb img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.morning__thumb span { position: relative; padding-top: 0.55rem; }
.morning__thumb.is-active { opacity: 1; }
.morning__thumb.is-active span::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--accent); }
@media (hover: hover) and (pointer: fine) { .morning__thumb:hover { opacity: 0.85; } }
.morning__step { width: 48px; height: 48px; display: grid; place-items: center; background: rgba(244, 242, 237, 0.12); font-size: 1.25rem; transition: background-color 180ms ease; }
@media (hover: hover) and (pointer: fine) { .morning__step:hover { background: rgba(244, 242, 237, 0.22); } }

/* ---------- recent work ---------- */
.work { margin-top: var(--section); }
.work__head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; }
.work__head > div { display: grid; gap: 0.75rem; }
.work__grid { margin-top: clamp(2rem, 4vw, 3rem); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: clamp(180px, 19vw, 300px); gap: var(--gutter); grid-template-areas:
  "kit kit kit kit kit crew crew crew deck deck deck deck"
  "beam beam beam liv liv crew crew crew liv2 liv2 liv2 liv2"; }
.work__tile { overflow: clip; background: var(--surface); }
.work__tile img { width: 100%; height: 100%; object-fit: cover; }
.work__tile--kitchen { grid-area: kit; }
.work__tile--crew { grid-area: crew; }
.work__tile--deck { grid-area: deck; }
.work__tile--beam { grid-area: beam; }
.work__tile--living { grid-column: 4 / 6; grid-row: 2; }
.work__tile--boards { grid-area: liv2; }
.work__tile--boards img { object-position: 50% 60%; }

/* ---------- about ---------- */
.about { margin-top: var(--section); padding-bottom: var(--section); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
.about__title { grid-column: 1 / 13; margin-bottom: clamp(2rem, 3.5vw, 3rem); }
.about__text { grid-column: 2 / 13; }
.about__text p { max-width: 36em; }
.about__text p + p { margin-top: 1.3em; }
.about__mark { float: left; width: 3.7em; height: 3.7em; margin: 0.1em 0.55em 0 0; }

/* ---------- footer: stay connected ---------- */
.footer { background: var(--field); color: var(--field-ink); padding-block: clamp(4rem, 7vw, 6rem) 2rem; }
.footer__main { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 3rem; align-items: start; }
.footer__cta { grid-column: 1 / 6; display: grid; gap: 1rem; justify-items: start; }
.footer__col { grid-column: span 2; display: grid; gap: 0.5rem; justify-items: start; }
.footer__col:nth-of-type(2) { grid-column: 7 / 10; }
.footer__col:nth-of-type(3) { grid-column: 10 / 12; }
.footer__col:nth-of-type(4) { grid-column: 12 / 13; }
.footer__col h3 { font-family: var(--font-text); font-size: var(--step-body); font-weight: 500; margin-bottom: 0.25rem; }
.footer__col a, .footer__col span { opacity: 0.85; }
.footer__base { margin-top: clamp(3.5rem, 6vw, 5rem); display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.footer__logo { width: 150px; height: auto; }
.footer__base p { max-width: none; opacity: 0.85; }

/* ---------- film dialog ---------- */
.film { width: auto; max-width: 92vw; padding: 0; border: 0; background: var(--ink); color: var(--field-ink); }
.film::backdrop { background: rgba(20, 35, 74, 0.88); }
.film__video { display: block; height: min(82svh, 1920px); width: auto; max-width: 92vw; aspect-ratio: 9 / 16; object-fit: contain; background: #0e1424; }
.film form { display: flex; justify-content: flex-end; padding: 0.75rem; }

/* ---------- tablet ---------- */
@media (max-width: 1024px) {
  .intro__head h2 { grid-column: 1 / 13; }
  .intro__lead { grid-column: 1 / 10; }
  .intro__photo { grid-column: 1 / 8; }
  .intro__side { grid-column: 8 / 13; }
  .process__intro { grid-column: 1 / 13; margin-bottom: 3rem; }
  .process__steps { grid-column: 1 / 13; }
  .morning__top > div:first-child { grid-column: 1 / 13; }
  .morning__facts { grid-column: 1 / 13; margin-top: 2rem; grid-template-columns: repeat(3, 1fr); }
  .morning__facts div { grid-template-columns: 1fr; }
  .about__title { grid-column: 1 / 13; margin-bottom: 2rem; }
  .about__text { grid-column: 1 / 13; }
  .footer__cta { grid-column: 1 / 13; }
  .footer__col:nth-of-type(2) { grid-column: 1 / 6; }
  .footer__col:nth-of-type(3) { grid-column: 6 / 10; }
  .footer__col:nth-of-type(4) { grid-column: 10 / 13; }
}

/* ---------- phone ---------- */
@media (max-width: 720px) {
  .nav { grid-template-columns: auto 1fr; }
  .nav__links, .nav__action { display: none; }
  .nav__logo { width: 170px; }
  .nav__menu { display: block; justify-self: end; position: relative; }
  .nav__menu summary { list-style: none; cursor: pointer; min-height: 44px; display: flex; align-items: center; font-size: var(--step-nav); font-weight: 500; }
  .nav__menu summary::-webkit-details-marker { display: none; }
  .nav__menu ul { position: absolute; right: 0; top: 100%; z-index: 5; background: var(--bg); color: var(--ink); padding: 1rem 1.25rem; display: grid; gap: 0.75rem; min-width: 11rem; }
  .nav__menu a { text-decoration: none; }

  .hero__title { font-size: 12.4vw; }
  .hero__actions { flex-direction: column; align-items: stretch; gap: 1.1rem; }
  .hero__actions .button { width: 100%; }
  .hero__link { justify-content: center; }

  .intro__lead { grid-column: 1 / 13; }
  .intro__split { display: block; }
  .intro__side { margin-top: 1.5rem; gap: 1.25rem; }
  .intro__photo2 { aspect-ratio: 4 / 3; }

  .services__tabs { gap: 1.5rem; }
  .services__copy { text-align: left; justify-items: start; }
  .arc__stage { height: 380px; }

  .process__steps li { grid-template-columns: 1fr; row-gap: 0.4rem; }

  .morning__frame { aspect-ratio: 4 / 3; }
  .morning__caption { flex-direction: column; gap: 0.25rem; }
  .morning__strip-wrap { grid-template-columns: 1fr; }
  .morning__step { display: none; }
  .morning__strip { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 1rem; }

  .work__head { flex-direction: column; align-items: start; }
  .work__grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 44vw; grid-template-areas: none; grid-auto-flow: row dense; }
  .work__tile { grid-area: auto !important; grid-column: auto !important; grid-row: auto !important; }
  .work__tile--kitchen, .work__tile--deck { grid-column: 1 / -1 !important; }
  .work__tile--crew { grid-row: span 2 !important; }
  .work__tile--boards { grid-column: 1 / -1 !important; }

  .footer__main { display: grid; grid-template-columns: 1fr 1fr; }
  .footer__cta { grid-column: 1 / -1; }
  .footer__col:nth-of-type(n) { grid-column: auto; }
  .footer__base { flex-direction: column; align-items: start; }
}

/* ---------- motion: quiet fades only ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero__picture img { animation: hero-drift 26s ease-in-out infinite alternate; transform-origin: 55% 60%; }
  .js [data-reveal] { opacity: 0; transition: opacity 650ms ease; transition-delay: calc(var(--i, 0) * 90ms); }
  .js [data-reveal].is-in { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .services__panel { animation: none; }
  .morning__img { transition: none; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes hero-drift { from { transform: scale(1) translate3d(0, 0, 0); } to { transform: scale(1.06) translate3d(-1.2%, -0.8%, 0); } }
