/* ===========================================================
   Max Potter, tailoring — site styles
   Built to the brand guide v1.7
   =========================================================== */

:root {
  --cream:     #F5ECE0;
  --off-white: #F2F2F2;
  --taupe:     #B9A590;
  --ink-soft:  #6B5A45;
  --navy:      #223A53;
  --brown:     #402917;
  --rule:      rgba(64, 41, 23, 0.35);

  --measure: 64ch;
  --gutter:  clamp(20px, 5vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html { background: var(--cream); }

body {
  font-family: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  color: var(--brown);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--navy);
  text-decoration: none;
  border-bottom: 1px solid rgba(34, 58, 83, 0.25);
  transition: border-color 180ms ease, color 180ms ease;
}
a:hover { border-bottom-color: var(--navy); }

::selection { background: var(--navy); color: var(--cream); }

/* =========================================================
   TYPE
   ========================================================= */

h1, h2, h3, h4 {
  font-family: "Prata", "Times New Roman", serif;
  font-weight: 400;
  color: var(--brown);
  line-height: 1.12;
  letter-spacing: -0.005em;
  margin: 0 0 0.4em;
}

h1 { font-size: clamp(40px, 7vw, 72px); }
h2 { font-size: clamp(30px, 4.4vw, 48px); line-height: 1.15; }
h3 { font-size: clamp(22px, 2.4vw, 28px); line-height: 1.25; }
h4 { font-size: 18px; }

p { margin: 0 0 1em; max-width: var(--measure); }

.lede {
  font-family: "Prata", serif;
  font-size: clamp(20px, 2.1vw, 26px);
  line-height: 1.45;
  color: var(--brown);
  max-width: 30ch;
}

.eyebrow {
  display: inline-block;
  font-family: "Raleway", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 1.4em;
}

.smallcaps {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

blockquote {
  margin: 0;
  font-family: "Prata", serif;
  font-size: clamp(22px, 2.3vw, 30px);
  line-height: 1.4;
  color: var(--brown);
}
blockquote cite {
  display: block;
  margin-top: 14px;
  font-family: "Raleway", sans-serif;
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

ul.em-list { list-style: none; padding: 0; margin: 0; }
ul.em-list li {
  padding-left: 20px;
  position: relative;
  margin-bottom: 10px;
}
ul.em-list li::before {
  content: "·";
  position: absolute;
  left: 4px;
  color: var(--taupe);
}

/* =========================================================
   LAYOUT
   ========================================================= */

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.wrap--narrow { max-width: 820px; }

section { padding: clamp(64px, 9vw, 128px) 0; }
section + section { border-top: 0; }

.section-cream    { background: var(--cream); }
.section-offwhite { background: var(--off-white); }
.section-navy     { background: var(--navy); color: var(--cream); }
.section-navy h1, .section-navy h2, .section-navy h3, .section-navy h4 { color: var(--cream); }
.section-navy a { color: var(--cream); border-bottom-color: rgba(245, 236, 224, 0.35); }
.section-navy a:hover { border-bottom-color: var(--cream); }
.section-navy .eyebrow { color: var(--taupe); }

.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
@media (min-width: 820px) {
  .two-col { grid-template-columns: 1fr 1fr; }
  .two-col--text-image { grid-template-columns: 1.05fr 1fr; }
  .two-col--image-text { grid-template-columns: 1fr 1.05fr; }
}

.three-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vw, 48px);
}
@media (min-width: 720px) {
  .three-col { grid-template-columns: repeat(3, 1fr); }
}

.stack > * + * { margin-top: clamp(16px, 1.8vw, 22px); }
.stack-lg > * + * { margin-top: clamp(28px, 3.4vw, 44px); }

.center { text-align: center; }
.center p, .center .lede { margin-left: auto; margin-right: auto; }

/* =========================================================
   HEADER / NAV
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  padding: 22px 0;
  border-bottom: 1px solid transparent;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.wordmark {
  font-family: "Prata", serif;
  font-size: 20px;
  color: var(--brown);
  letter-spacing: 0.01em;
  border: 0;
}
.wordmark:hover { color: var(--brown); }

.nav {
  display: flex;
  gap: clamp(18px, 3vw, 36px);
  align-items: center;
}
.nav a {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brown);
  border: 0;
  padding: 4px 0;
  position: relative;
  transition: color 250ms ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--navy);
  transition: width 300ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.nav a:hover { color: var(--navy); }
.nav a:hover::after { width: 100%; }
.nav a.is-current::after {
  width: 100%;
  background: var(--taupe);
}

@media (max-width: 560px) {
  .nav { gap: 16px; }
  .nav a { font-size: 11px; letter-spacing: 0.18em; }
  .wordmark { font-size: 17px; }
}

/* =========================================================
   HERO
   ========================================================= */

.hero {
  padding: clamp(48px, 7vw, 96px) 0 clamp(64px, 8vw, 112px);
  position: relative;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(36px, 5vw, 72px);
  align-items: end;
  position: relative;
  z-index: 1;
}
.hero__mp {
  position: absolute;
  right: clamp(-8px, 1vw, 24px);
  bottom: clamp(-40px, -2.5vw, -16px);
  font-family: "Prata", serif;
  font-size: clamp(140px, 20vw, 280px);
  color: var(--taupe);
  opacity: 0.18;
  line-height: 0.82;
  letter-spacing: -0.02em;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.hero__cta {
  display: inline-block;
  margin-top: clamp(24px, 3vw, 36px);
  font-family: "Raleway", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brown);
  border-bottom: 1px solid var(--taupe);
  padding: 0 0 8px;
  transition: color 180ms ease, border-color 180ms ease;
}
.hero__cta:hover { color: var(--navy); border-bottom-color: var(--navy); }
@media (min-width: 880px) {
  .hero__inner { grid-template-columns: 1.05fr 1fr; align-items: center; }
}
.hero__heading {
  font-size: clamp(40px, 6.6vw, 84px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
}
.hero__sub {
  font-family: "Raleway", sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.hero__image {
  aspect-ratio: 3/4;
  background: var(--off-white);
  overflow: hidden;
}
.hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================================================
   PREMISE
   ========================================================= */

.premise {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 3vw, 44px);
}
@media (min-width: 720px) {
  .premise { grid-template-columns: repeat(3, 1fr); }
}
.premise__item .num {
  font-family: "Prata", serif;
  font-size: 28px;
  color: var(--taupe);
  line-height: 1;
  display: block;
  margin-bottom: 12px;
}
.premise__item h3 { font-size: 22px; margin-bottom: 8px; }
.premise__item p { font-size: 16px; }

/* =========================================================
   PULL / QUOTE
   ========================================================= */

.pull {
  font-family: "Prata", serif;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.35;
  color: var(--brown);
  padding-left: clamp(16px, 2vw, 28px);
  border-left: 2px solid var(--taupe);
  max-width: 26ch;
}

/* =========================================================
   IMAGE FRAME
   ========================================================= */

.frame {
  overflow: hidden;
  background: var(--off-white);
  aspect-ratio: 3/4;
}
.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.frame--wide { aspect-ratio: 4/3; }
.frame--square { aspect-ratio: 1/1; }

/* =========================================================
   SERVICES
   ========================================================= */

.service {
  padding: 36px 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 720px) {
  .service { grid-template-columns: 220px 1fr; gap: 48px; align-items: baseline; }
}
.service:last-child { border-bottom: 1px solid var(--rule); }
.service h3 { font-size: 22px; margin: 0; }
.service p { font-size: 16px; margin: 0; }

/* =========================================================
   FORM
   ========================================================= */

.form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  max-width: 640px;
}
.form .row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
@media (min-width: 600px) {
  .form .row--two { grid-template-columns: 1fr 1fr; }
}

.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.field input,
.field textarea,
.field select {
  font-family: "Raleway", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--brown);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 10px 0;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 0;
  border-bottom-color: var(--navy);
}
.field input::placeholder,
.field textarea::placeholder { color: rgba(64, 41, 23, 0.4); }

.field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='none' stroke='%236B5A45' stroke-width='1.4' d='M1 1.5 L6 6.5 L11 1.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 4px center;
  padding-right: 28px;
}

.btn {
  display: inline-block;
  font-family: "Raleway", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--navy);
  padding: 16px 28px;
  border: 0;
  cursor: pointer;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: color 280ms ease;
  z-index: 0;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--brown);
  transform: translateX(-100%);
  transition: transform 340ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: -1;
}
.btn:hover::before { transform: translateX(0); }
.btn:hover { color: var(--cream); }

.btn--ghost {
  background: transparent;
  color: var(--brown);
  border: 1px solid var(--brown);
}
.btn--ghost:hover { background: var(--brown); color: var(--cream); }

.form-note {
  font-size: 14px;
  color: var(--ink-soft);
  max-width: 56ch;
}

/* =========================================================
   CUT EDGE TRANSITION
   Tiled SVG so teeth stay 32 x 32px at every viewport.
   ========================================================= */

.cut-edge {
  display: block;
  height: 32px;
  background-color: var(--cream);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' shape-rendering='crispEdges'><path fill='%23223A53' d='M0,32 L0,16 L16,0 L32,16 L32,32 Z'/></svg>");
  background-repeat: repeat-x;
  background-position: bottom left;
  background-size: 32px 32px;
}
.cut-edge--from-offwhite { background-color: var(--off-white); }

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  background: var(--navy);
  color: var(--cream);
  padding: clamp(56px, 7vw, 96px) 0 36px;
}
.site-footer a {
  color: var(--cream);
  border-bottom-color: rgba(245, 236, 224, 0.35);
}
.site-footer a:hover { border-bottom-color: var(--cream); }

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 4vw, 56px);
}
@media (min-width: 760px) {
  .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

.site-footer .wordmark--reverse {
  font-family: "Prata", serif;
  font-size: 26px;
  color: var(--cream);
  display: block;
  margin-bottom: 14px;
}
.site-footer__tag {
  font-size: 14px;
  color: rgba(245, 236, 224, 0.75);
  max-width: 36ch;
}
.site-footer__heading {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--taupe);
  margin: 0 0 14px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { font-size: 15px; margin-bottom: 8px; }
.site-footer__base {
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: 24px;
  border-top: 1px solid rgba(245, 236, 224, 0.18);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(245, 236, 224, 0.65);
}

/* =========================================================
   PAGE INTRO (about/services/appointment)
   ========================================================= */

.page-intro {
  padding: clamp(72px, 9vw, 128px) 0 clamp(48px, 6vw, 88px);
}
.page-intro h1 {
  font-size: clamp(40px, 5.8vw, 72px);
  line-height: 1.05;
  max-width: 14ch;
  margin: 0 0 24px;
}
.page-intro .lede { max-width: 36ch; }

/* =========================================================
   SECTION DOT NAV
   ========================================================= */

.section-nav {
  position: fixed;
  right: clamp(16px, 2.5vw, 36px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-end;
}
.section-nav__dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--taupe);
  opacity: 0.4;
  cursor: pointer;
  border: 0;
  padding: 0;
  flex-shrink: 0;
  transition: opacity 300ms ease, transform 300ms ease, background 300ms ease;
}
.section-nav__dot::before {
  content: attr(data-label);
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-family: "Raleway", sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--navy);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 200ms ease;
  pointer-events: none;
}
.section-nav__dot:hover::before { opacity: 1; }
.section-nav__dot:hover,
.section-nav__dot.is-active {
  opacity: 1;
  background: var(--navy);
  transform: scale(1.6);
}
@media (max-width: 860px) { .section-nav { display: none; } }

/* =========================================================
   HERO — full viewport + scroll indicator
   ========================================================= */

.hero {
  min-height: calc(100vh - 140px);
  padding: clamp(48px, 7vw, 96px) 0 clamp(60px, 7vw, 88px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero__scroll {
  position: absolute;
  bottom: clamp(20px, 3vw, 32px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  z-index: 2;
  background: none;
  border: 0;
  padding: 0;
  color: var(--ink-soft);
  font-family: "Raleway", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0;
  animation: fade-in-up 0.8s 1.2s cubic-bezier(0.2,0.6,0.2,1) forwards;
  transition: color 200ms ease;
}
.hero__scroll:hover { color: var(--navy); }
@keyframes fade-in-up {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.hero__scroll__line {
  width: 1px;
  height: 52px;
  background: var(--taupe);
  transform-origin: top;
  animation: scroll-line 2s 1.2s ease-in-out infinite;
}
.hero__scroll:hover .hero__scroll__line { background: var(--navy); }
@keyframes scroll-line {
  0%   { transform: scaleY(0); opacity: 0; }
  50%  { opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* =========================================================
   PAGE TRANSITIONS
   ========================================================= */

@keyframes page-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

body { animation: page-in 0.4s ease both; }

body.is-leaving {
  opacity: 0;
  transition: opacity 0.32s ease;
  pointer-events: none;
}

/* =========================================================
   HEADER HAIRLINE ON SCROLL
   ========================================================= */

.site-header {
  transition: border-color 400ms ease;
}
.site-header--scrolled {
  border-bottom-color: var(--rule);
}

/* =========================================================
   IMAGE HOVER ZOOM
   ========================================================= */

.frame img {
  transition: transform 700ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.frame:hover img {
  transform: scale(1.05);
}
.hero__image img {
  transition: transform 700ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.hero__image:hover img {
  transform: scale(1.05);
}

/* =========================================================
   SCROLL REVEAL
   ========================================================= */

.sr {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.6, 0.2, 1),
              transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.sr--visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .sr { opacity: 1; transform: none; transition: none; }
}


/* =========================================================
   RUNNING-STITCH SECTION DIVIDERS
   ========================================================= */

section + section {
  position: relative;
}
section + section::before {
  content: '';
  position: absolute;
  top: -1px;
  left: clamp(24px, 6vw, 80px);
  right: clamp(24px, 6vw, 80px);
  height: 4px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='26' height='3'><rect x='0' y='1' width='13' height='1.5' rx='0.75' fill='%23402917'/></svg>");
  background-repeat: repeat-x;
  background-position: left center;
  background-size: 26px 3px;
  opacity: 0.4;
}

/* =========================================================
   LINEN / GRAIN TEXTURE OVERLAY
   ========================================================= */

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='256' height='256'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='256' height='256' filter='url(%23n)' opacity='0.07'/></svg>");
  background-repeat: repeat;
  background-size: 256px 256px;
}

