/* ——————————————————————————————————————————————
   Ugency — monochrome editorial system
   Ink on warm paper. No gradients, no shadows,
   no rounded corners. Hairlines do the structure.
—————————————————————————————————————————————— */

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

/* Dark is the default theme; [data-theme="light"] flips to paper. */
:root {
  color-scheme: dark;
  --paper:   #121110;
  --paper-2: #191816;
  --ink:     #edeae2;
  --sub:     #a19c92;
  --faint:   #625d55;
  --line:    #2a2724;
  --inv-sub: #6f6a62;   /* secondary text on inverted (hover) rows */
  --coal:    #0c0b0a;   /* footer / inverted blocks */
  --on-coal: #edeae2;
  --coal-line: #242220;
  --coal-dim:  #8a857b;
  --coal-link: #a19c92;
  --watermark: #181614;
  --header-bg: rgba(18, 17, 16, 0.92);
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --max: 1280px;
}

[data-theme="light"] {
  color-scheme: light;
  --paper:   #f6f4ef;
  --paper-2: #edeae2;
  --ink:     #191817;
  --sub:     #6f6a62;
  --faint:   #a5a099;
  --line:    #ddd8ce;
  --inv-sub: #b8b3ab;
  --coal:    #121110;
  --on-coal: #f6f4ef;
  --coal-line: #2a2825;
  --coal-dim:  #7d786f;
  --coal-link: #a5a099;
  --watermark: #1d1b19;
  --header-bg: rgba(246, 244, 239, 0.92);
}

/* Smooth theme cross-fade: .theming is set on <html> for the duration
   of a toggle only, so it never slows normal hover transitions. */
html.theming, html.theming *, html.theming *::before, html.theming *::after {
  transition: background-color 0.45s ease, color 0.45s ease, border-color 0.45s ease !important;
}

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

body {
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--ink); color: var(--paper); }

img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* —— type —— */

h1, h2, h3, .serif {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.9rem, 8vw, 6.25rem); line-height: 0.98; }
h2 { font-size: clamp(1.9rem, 4.2vw, 3.25rem); line-height: 1.05; }
h3 { font-size: 1.4rem; line-height: 1.2; }
em  { font-style: italic; }

.label {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sub);
}

.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.6; max-width: 34em; }
.muted { color: var(--sub); }
.small { font-size: 0.875rem; }

/* —— header —— */

.top {
  position: sticky; top: 0; z-index: 10;
  background: var(--header-bg);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.bar {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 1.1rem; padding-bottom: 1.1rem;
}

/* Logo: the U is the brand ("built around you") — a stamped square that
   inverts and tilts on hover while the tagline slips out underneath. */
.mark {
  display: inline-flex; align-items: center; gap: 0.4rem;
  position: relative;
  font-family: var(--serif);
  font-size: 1.35rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.mark-u {
  width: 1.6rem; height: 1.6rem;
  border: 1px solid var(--ink);
  display: grid; place-items: center;
  font-size: 1.05rem; line-height: 1;
  transition: background-color 0.25s ease, color 0.25s ease,
              transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mark-rest { transition: letter-spacing 0.35s ease; }
.mark-tag {
  position: absolute; left: 0; top: calc(100% + 1px);
  font-family: var(--sans);
  font-size: 0.5rem; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--sub);
  white-space: nowrap; pointer-events: none;
  opacity: 0; transform: translateY(-4px);
  transition: opacity 0.3s ease 0.05s, transform 0.3s ease 0.05s;
}
.mark:hover .mark-u, .mark:focus-visible .mark-u {
  background: var(--ink); color: var(--paper);
  transform: rotate(-8deg) scale(1.08);
}
.mark:hover .mark-rest { letter-spacing: 0.05em; }
.mark:hover .mark-tag, .mark:focus-visible .mark-tag { opacity: 1; transform: none; }

.bar nav { display: flex; gap: clamp(1.25rem, 3vw, 2.5rem); align-items: center; }
.bar nav a {
  font-size: 0.875rem;
  text-decoration: none;
  color: var(--sub);
  background-image: linear-gradient(var(--ink), var(--ink));
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: 0 100%;
  padding-bottom: 3px;
  transition: color 0.2s ease, background-size 0.25s ease;
}
.bar nav a:hover, .bar nav a.on { color: var(--ink); }
.bar nav a:hover { background-size: 100% 1px; }
.bar nav a.on { background-size: 100% 1px; }
.navcta { color: var(--ink) !important; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
@media (max-width: 560px) { .navcta { display: none; } }

.theme-btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-family: var(--sans);
  font-size: 0.6875rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--sub);
}
.theme-btn:hover { color: var(--ink); }

/* —— generic section rhythm —— */

.sec { border-top: 1px solid var(--line); padding: clamp(3.5rem, 9vw, 7rem) 0; }
.sec-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}
.sec-grid > .side { position: sticky; top: 5.5rem; }
@media (max-width: 860px) {
  .sec-grid { grid-template-columns: 1fr; }
  .sec-grid > .side { position: static; }
}
section[id] { scroll-margin-top: 4.5rem; }

/* —— hero —— */

.hero { padding: clamp(4rem, 11vw, 9rem) 0 clamp(3rem, 7vw, 5rem); }
.hero .label { display: block; margin-bottom: 1.75rem; }
.hero h1 { max-width: 11em; }
.hero .lede { margin-top: 2rem; color: var(--sub); }
.hero-actions { margin-top: 2.5rem; display: flex; gap: 2rem; align-items: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--ink);
  padding: 0.95rem 1.6rem;
  font-size: 0.9rem; letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn:hover { background: transparent; color: var(--ink); }

.textlink {
  font-size: 0.9rem;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-color: var(--faint);
}
.textlink:hover { text-decoration-color: var(--ink); }

.hero-notes {
  margin-top: clamp(3rem, 8vw, 5.5rem);
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
  padding-top: 1.25rem;
}
.hero-notes p { font-size: 0.875rem; color: var(--sub); max-width: 18em; }
.hero-notes p b { display: block; color: var(--ink); font-weight: 500; }
@media (max-width: 700px) { .hero-notes { grid-template-columns: 1fr; gap: 1rem; } }

/* —— manifesto (why us) —— */

.creed { border-top: 1px solid var(--line); padding: 1.6rem 0; }
.creed:first-child { border-top: 0; padding-top: 0; }
.creed .n { font-size: 0.6875rem; letter-spacing: 0.16em; color: var(--faint); }
.creed p {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1.25;
  margin-top: 0.35rem;
  max-width: 24em;
}
.why-note { margin-top: 2.25rem; color: var(--sub); max-width: 38em; }

/* —— services rows —— */

.svc-list { border-bottom: 1px solid var(--line); }
.svc {
  position: relative;
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 1.5rem;
  align-items: baseline;
  border-top: 1px solid var(--line);
  padding: 1.35rem 2.6rem 1.35rem 0.6rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.svc::after {
  content: "→";
  position: absolute; right: 1rem; top: 50%;
  opacity: 0; transform: translate(-8px, -50%);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.svc:hover::after { opacity: 1; transform: translate(0, -50%); }
.svc .n { font-size: 0.75rem; color: var(--faint); letter-spacing: 0.1em; }
.svc h3 { font-size: clamp(1.2rem, 1.8vw, 1.45rem); }
.svc p { font-size: 0.9rem; color: var(--sub); }
.svc:hover { background: var(--ink); color: var(--paper); }
.svc:hover .n { color: var(--faint); }
.svc:hover p { color: var(--inv-sub); }
@media (max-width: 700px) {
  .svc { grid-template-columns: 2.5rem 1fr; }
  .svc p { grid-column: 2; }
}

/* —— process steps —— */

.step {
  display: grid;
  grid-template-columns: minmax(4.5rem, 8rem) 1fr;
  gap: clamp(1rem, 3vw, 2.5rem);
  border-top: 1px solid var(--line);
  padding: 1.9rem 0;
}
.step:first-of-type { border-top: 0; padding-top: 0; }
.step .n {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.9rem, 3.5vw, 2.75rem);
  line-height: 1;
  color: var(--faint);
  transition: color 0.25s ease, transform 0.25s ease;
}
.step:hover .n { color: var(--ink); transform: translateX(0.3rem); }
.step p { color: var(--sub); margin-top: 0.4rem; max-width: 36em; }

/* —— FAQ —— */

.faq { border-bottom: 1px solid var(--line); }
.faq details { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem;
  padding: 1.3rem 0.25rem;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--sans); color: var(--faint); font-size: 1.3rem; flex-shrink: 0; transition: transform 0.3s ease, color 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); color: var(--ink); }
.faq summary:hover::after { color: var(--ink); }
.faq details p { padding: 0 0.25rem 1.5rem; color: var(--sub); max-width: 42em; }

/* —— quote band (about) —— */

.quote-band { background: var(--paper-2); border-top: 1px solid var(--line); padding: clamp(4rem, 10vw, 7rem) 0; }
.quote-band blockquote { font-family: var(--serif); font-size: clamp(1.9rem, 5vw, 3.75rem); line-height: 1.1; max-width: 16em; }
.quote-band figcaption { margin-top: 1.5rem; }

/* —— founder —— */

.founder-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
@media (max-width: 860px) { .founder-grid { grid-template-columns: 1fr; } }
.monogram {
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--paper-2);
  max-width: 22rem;
}
.monogram img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(1);
  transition: transform 0.6s ease;
}
.monogram-wrap:hover .monogram img { transform: scale(1.04); }
.industries { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.industries p { font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sub); line-height: 2; }

.prose p + p { margin-top: 1.2em; }
.prose { max-width: 44em; }
.prose strong { font-weight: 600; }

/* —— contact —— */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.next-list { margin-top: 2.5rem; border-top: 1px solid var(--line); }
.next-list li {
  list-style: none;
  display: grid; grid-template-columns: 2.25rem 1fr; gap: 0.75rem;
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
  font-size: 0.9rem; color: var(--sub);
}
.next-list li b { color: var(--ink); font-weight: 500; }
.next-list .n { font-family: var(--serif); font-style: italic; color: var(--faint); font-size: 1.1rem; }

form .field { border-bottom: 1px solid var(--line); padding: 1.1rem 0 0.6rem; }
form .field:first-child { padding-top: 0; }
form label { display: block; }
form .field .label { display: block; margin-bottom: 0.2rem; }
form .field .label .opt { text-transform: none; letter-spacing: 0.02em; color: var(--faint); }
input, select, textarea {
  width: 100%;
  background: transparent;
  border: 0;
  font: inherit;
  color: var(--ink);
  padding: 0.35rem 0;
}
input:focus, select:focus, textarea:focus { outline: none; }
form .field:focus-within { border-bottom-color: var(--ink); }
textarea { resize: vertical; min-height: 7rem; }
select { appearance: none; cursor: pointer; }
.selwrap { position: relative; }
.selwrap::after {
  content: "↓"; position: absolute; right: 0.25rem; top: 50%;
  transform: translateY(-50%);
  color: var(--faint); pointer-events: none; font-size: 0.85rem;
}
.consent { display: flex; gap: 0.7rem; align-items: flex-start; margin-top: 1.75rem; font-size: 0.85rem; color: var(--sub); }
.consent input { width: 1rem; height: 1rem; margin-top: 0.2rem; accent-color: var(--ink); flex-shrink: 0; }
form .btn { margin-top: 2rem; cursor: pointer; }
.form-note { margin-top: 1rem; font-size: 0.8125rem; color: var(--faint); }

/* —— privacy (collapsible, contact page) —— */

.privacy { border-top: 1px solid var(--line); padding: clamp(2.5rem, 6vw, 4rem) 0; }
.privacy summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--serif); font-size: 1.3rem;
}
.privacy summary::-webkit-details-marker { display: none; }
.privacy summary::after { content: "+"; color: var(--faint); font-size: 1.3rem; transition: transform 0.3s ease; }
.privacy details[open] summary::after { transform: rotate(45deg); }
.privacy .prose { margin-top: 2rem; font-size: 0.9rem; color: var(--sub); }
.privacy .prose h3 { font-family: var(--sans); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); margin: 1.75em 0 0.5em; }
.privacy .prose ul { padding-left: 1.1em; }

/* —— footer / CTA —— */

.foot { background: var(--coal); color: var(--on-coal); overflow: hidden; }
.foot-cta { padding: clamp(4rem, 10vw, 7rem) 0 clamp(2.5rem, 6vw, 4rem); }
.foot-cta .label { color: var(--coal-dim); }
.foot-cta h2 { max-width: 12em; margin-top: 1.25rem; }
.foot-cta .btn { background: var(--on-coal); color: var(--coal); border-color: var(--on-coal); margin-top: 2.25rem; }
.foot-cta .btn:hover { background: transparent; color: var(--on-coal); }

.foot-meta {
  border-top: 1px solid var(--coal-line);
  padding: 1.5rem 0;
  display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  font-size: 0.8125rem; color: var(--coal-dim);
}
.foot-meta nav { display: flex; gap: 1.5rem; }
.foot-meta a { color: var(--coal-link); text-decoration: none; }
.foot-meta a:hover { color: var(--on-coal); }

.foot-mark {
  font-family: var(--serif);
  font-size: clamp(5rem, 21vw, 19rem);
  line-height: 0.72;
  color: var(--watermark);
  text-align: center;
  user-select: none;
  margin-bottom: -0.08em;
  cursor: pointer;
}
.foot-mark span { display: inline-block; transition: transform 0.45s ease, color 0.45s ease; }
.foot-mark:hover span { transform: translateY(-0.07em); color: #2e2b27; }

/* —— interactions —— */

/* scroll progress hairline (injected by main.js) */
.progress {
  position: fixed; top: 0; left: 0; z-index: 60;
  width: 100%; height: 2px;
  background: var(--ink);
  transform: scaleX(0); transform-origin: 0 50%;
  pointer-events: none;
}

/* rotating word in the hero */
.swap { display: inline-block; transition: opacity 0.28s ease, transform 0.28s ease; }
.swap.out { opacity: 0; transform: translateY(0.3em); }

/* marquee ticker */
.ticker {
  /* only a top rule — the next section's border-top closes the strip */
  border-top: 1px solid var(--line);
  overflow: hidden;
  padding: 0.9rem 0;
}
.ticker-track {
  display: flex; gap: 3rem; width: max-content;
  font-family: var(--serif);
  font-size: 1.15rem;
  white-space: nowrap;
  animation: tick 30s linear infinite;
}
.ticker-track span { color: var(--sub); }
.ticker-track .sep { color: var(--faint); }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes tick { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* reveal on scroll (class added by main.js; without JS nothing is hidden) */
.rv { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.rv.in { opacity: 1; transform: none; }

/* budget chips (contact) */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.45rem 0 0.2rem; }
.chip { position: relative; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; margin: 0; }
.chip span {
  display: inline-block;
  border: 1px solid var(--line);
  padding: 0.45rem 0.85rem;
  font-size: 0.8125rem; color: var(--sub);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.chip:hover span { border-color: var(--ink); color: var(--ink); }
.chip input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 1px solid var(--ink); outline-offset: 2px; }

/* copy-to-clipboard (contact) */
.copy-btn {
  background: none; border: 0; padding: 0 0 2px; cursor: pointer;
  font-family: var(--sans); font-size: 0.6875rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--sub); border-bottom: 1px solid var(--line);
  margin-left: 0.6rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.copy-btn:hover { color: var(--ink); border-color: var(--ink); }

/* founder socials + industry tags (about) */
.socials { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.4rem; }
.s-link {
  display: inline-block;
  border: 1px solid var(--line);
  padding: 0.5rem 0.95rem;
  font-size: 0.8125rem; text-decoration: none; color: var(--sub);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.s-link:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); transform: translateY(-2px); }

.tags { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.7rem; }
.tag {
  border: 1px solid var(--line);
  padding: 0.32rem 0.7rem;
  font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--sub); cursor: default;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.tag:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* monogram hover card (about) */
.monogram-wrap { position: relative; max-width: 22rem; }
.monogram-wrap .monogram { max-width: none; }
/* Scrim over the portrait. Always dark (the photo is dark in both themes),
   so its text colours are fixed rather than themed. */
.mono-links {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;
  background: rgba(12, 11, 10, 0.86);
  opacity: 0; transition: opacity 0.35s ease;
}
.monogram-wrap:hover .mono-links,
.monogram-wrap:focus-within .mono-links { opacity: 1; }
.mono-links a {
  color: #edeae2;
  font-family: var(--serif); font-size: 1.25rem;
  text-decoration: underline; text-underline-offset: 5px;
  text-decoration-color: #625d55;
}
.mono-links a:hover { text-decoration-color: #edeae2; }
.mono-links .label { pointer-events: none; color: #a19c92; }

/* buttons get a travelling arrow */
.btn::after { content: "→"; display: inline-block; margin-left: 0.55rem; transition: transform 0.25s ease; }
.btn:hover::after { transform: translateX(5px); }

/* —— thank-you: booking redirect —— */

.redirect {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}
.redirect p { color: var(--sub); font-size: 0.9rem; }
.redirect .count {
  font-family: var(--serif); font-style: italic;
  font-size: 1.5rem; color: var(--ink);
  margin-left: 0.15rem;
}
.countbar {
  height: 2px; background: var(--line);
  max-width: 22rem; margin: 1.1rem 0 0;
  overflow: hidden;
}
.countbar i {
  display: block; height: 100%;
  background: var(--ink);
  transform-origin: 0 50%;
  animation: deplete 5s linear forwards;
}
@keyframes deplete { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .countbar i { animation: none; } }
