/* ── Tokens ── */
:root {
  --bg:    #EDE0CC;
  --bg2:   #E2D4BC;
  --ink:   #261E12;
  --ink2:  #5E5040;
  --ink3:  #988070;
  --rust:  #8C3018;
  --rust2: #B84A2A;
  --sand:  #D8C9B0;
  --sand2: #CCBBA0;
  --serif:  'Playfair Display', Georgia, serif;
  --sans:   'Instrument Sans', system-ui, sans-serif;
  --script: 'Caveat', cursive;
  --ease:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --grain:  0.09;
}

[data-theme="night"] {
  --bg:    #17140F;
  --bg2:   #211D18;
  --ink:   #EAE4D8;
  --ink2:  #9A9080;
  --ink3:  #5C5650;
  --rust:  #D9734E;
  --rust2: #B84A2A;
  --sand:  #2C2820;
  --sand2: #352F28;
  --grain: 0.04;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
  overflow-x: hidden;
}

/* Grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  transition: opacity 0.5s;
}

/* ── Fade-in ── */
@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade { animation: rise 0.7s var(--ease) both; }
.fade-1 { animation-delay: 0.05s; }
.fade-2 { animation-delay: 0.15s; }
.fade-3 { animation-delay: 0.25s; }
.fade-4 { animation-delay: 0.35s; }
.fade-5 { animation-delay: 0.45s; }
.fade-6 { animation-delay: 0.55s; }

/* ── Layout ── */
.container {
  max-width: 80%;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--sand);
  transition: background 0.5s, border-color 0.5s;
}

.nav-inner {
  max-width: 80%;
  margin: 0 auto;
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  border: none;
  letter-spacing: -0.01em;
}

.nav-logo:hover { color: var(--rust); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.nav-links {
  display: flex;
  gap: 1.4rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--ink2);
  text-decoration: none;
  border: none;
  letter-spacing: 0.01em;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--rust); }

/* Vibe toggle */
.vibe-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--sand2);
  background: transparent;
  cursor: pointer;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s, background 0.3s, transform 0.65s var(--ease);
  flex-shrink: 0;
}

.vibe-btn:hover {
  border-color: var(--rust);
  background: var(--bg2);
}

/* ── Hero ── */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 2rem;
}

.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 1.2rem;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 1.6rem;
  max-width: 14ch;
}

.hero-title em {
  font-style: italic;
  color: var(--rust);
}

.hero-body {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--ink2);
  max-width: 44ch;
  margin-bottom: 2.2rem;
  line-height: 1.75;
}

.hero-body strong {
  font-weight: 500;
  color: var(--ink);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--bg);
  background: var(--rust);
  padding: 0.7rem 1.5rem;
  border-radius: 2px;
  text-decoration: none;
  border: none;
  transition: background 0.2s, transform 0.15s;
  letter-spacing: 0.01em;
}

.btn-primary:hover {
  background: var(--rust2);
  transform: translateY(-1px);
}

.hero-visual {
  display: none;
  position: relative;
  width: 100%;
  height: 400px;
  cursor: crosshair;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    min-height: 500px;
  }

  .hero-visual {
    display: flex !important;
    position: relative;
    width: 100%;
    height: 450px;
    cursor: crosshair;
    border-radius: 4px;
    overflow: hidden;
  }

  #hero-canvas {
    width: 100%;
    height: 100%;
    opacity: 0.4;
  }
}

/* ── Photo + Quote block ── */
.portrait-section {
  padding: 4.5rem 0;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: center;
}

.portrait-frame {
  position: relative;
}

.portrait-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 3px;
  display: block;
  background: var(--sand);
}

.portrait-corner {
  position: absolute;
  bottom: -10px;
  right: -10px;
  width: 60px;
  height: 60px;
  border-right: 2px solid var(--rust);
  border-bottom: 2px solid var(--rust);
  border-radius: 0 0 3px 0;
  pointer-events: none;
}

.portrait-side {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.quote-block {
  padding: 1.8rem 0 1.8rem 1.6rem;
  border-left: 3px solid var(--rust);
}

.quote-text {
  font-family: var(--script);
  font-size: 1.55rem;
  line-height: 1.45;
  color: var(--ink);
  margin-bottom: 1rem;
  word-break: auto-phrase;
}

.quote-attr {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink3);
}

.bio-text {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--ink2);
  line-height: 1.75;
}

/* ── Divider ── */
.divider {
  border: none;
  border-top: 1px solid var(--sand);
  margin: 0;
}

/* ── Services ── */
.services-section {
  padding: 4.5rem 0;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  margin-bottom: 2.8rem;
}

.section-label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rust);
  flex-shrink: 0;
  padding-top: 0.15rem;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 400;
  font-style: italic;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--sand);
  border: 1px solid var(--sand);
  border-radius: 4px;
  overflow: hidden;
}

.service-card {
  background: var(--bg);
  padding: 1.8rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  transition: background 0.2s;
}

.service-card:hover {
  background: var(--bg2);
}

.service-icon {
  font-size: 1.3rem;
  line-height: 1;
  margin-bottom: 0.3rem;
}

.service-name {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.25;
}

.service-desc {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--ink2);
  line-height: 1.7;
  flex: 1;
}

.service-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 0.3rem;
}

.tool-tag {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink2);
  background: var(--sand);
  padding: 3px 8px;
  border-radius: 2px;
  transition: background 0.2s, color 0.2s;
}

.service-card:hover .tool-tag {
  background: var(--sand2);
}

/* ── How I work ── */
.how-section {
  padding: 4.5rem 0;
  background: var(--bg2);
  transition: background 0.5s;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2.8rem;
}

.how-item {}

.how-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 2.2rem;
  color: var(--sand2);
  line-height: 1;
  margin-bottom: 0.8rem;
  transition: color 0.5s;
}

[data-theme="night"] .how-num { color: var(--rust); }

.how-title {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.how-desc {
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--ink2);
  line-height: 1.65;
}

/* ── FAQ ── */
.faq-section {
  padding: 4.5rem 0;
  background: var(--bg);
  transition: background 0.5s;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 100%;
}

.faq-item {
  background: var(--bg2);
  border: 1px solid var(--sand);
  border-radius: 4px;
  overflow: hidden;
  transition: background 0.3s, border-color 0.3s;
}

.faq-item:hover {
  border-color: var(--sand2);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem 1.6rem;
  cursor: pointer;
  list-style: none; 
  user-select: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question h3 {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
  margin: 0;
}

.faq-icon {
  font-size: 1.4rem;
  color: var(--rust);
  font-weight: 300;
  line-height: 1;
  transition: transform 0.3s var(--ease);
}

.faq-item[open] .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 1.6rem 1.4rem 1.6rem;
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--ink2);
  line-height: 1.75;
  border-top: 1px solid transparent;
}

.faq-item[open] .faq-answer {
  animation: revealContent 0.4s var(--ease) forwards;
}

@keyframes revealContent {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Contact ── */
.contact-section {
  padding: 5rem 0 4rem;
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-left {}

.contact-lead {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 1.4rem;
  letter-spacing: -0.01em;
}

.contact-body {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--ink2);
  line-height: 1.75;
  margin-bottom: 1.8rem;
}

.contact-right {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.contact-item {}

.contact-label {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 0.25rem;
}

.contact-value {
  font-size: 0.92rem;
  color: var(--ink);
}

.contact-value a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--sand2);
  transition: color 0.2s, border-color 0.2s;
}

.contact-value a:hover {
  color: var(--rust);
  border-color: var(--rust2);
}

.company-block {
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--sand);
}

.company-row {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  font-size: 0.82rem;
  margin-bottom: 0.2rem;
}

.company-key {
  color: var(--ink3);
  font-size: 0.75rem;
  font-weight: 400;
  min-width: 100px;
  flex-shrink: 0;
}

.company-val {
  color: var(--ink2);
  font-weight: 300;
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--sand);
  background: var(--bg2);
  transition: background 0.5s, border-color 0.5s;
}

.footer-inner {
  max-width: 80%;
  margin: 0 auto;
  padding: 1.4rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.72rem;
  color: var(--ink3);
  letter-spacing: 0.02em;
}

.footer-links {
  display: flex;
  gap: 1.2rem;
}

.footer-links a {
  font-size: 0.72rem;
  color: var(--ink3);
  text-decoration: none;
  border-bottom: 1px dotted var(--sand2);
  transition: color 0.2s, border-color 0.2s;
}

.footer-links a:hover {
  color: var(--rust);
  border-color: var(--rust2);
}

/* ── Responsive ── */
@media (max-width: 620px) {
  .container,
  .nav-inner,
  .footer-inner {
    max-width: 90%;
    padding: 0 1rem; 
  }

  .nav-links { display: none; }
  .portrait-section { grid-template-columns: 1fr; gap: 2rem; }
  .portrait-frame { max-width: 320px; }
  .services-grid { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: 1fr 1fr; gap: 1.2rem; }
  .contact-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero { padding: 3rem 0 0; }
  .hero-title { font-size: 2.2rem; }

  .service-card {
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 0.8rem;
  }

  .service-card:not(:last-child) {
    border-bottom: 1px solid var(--sand);
  }

  .faq-question h3 {
    font-size: 0.95rem;
  }
}

@media (max-width: 400px) {
  .container { padding: 0 1.3rem; }
  .nav-inner { padding: 0 1.3rem; }
  .how-grid { grid-template-columns: 1fr; }
}
