/* Daniel Wake-Smith landing page styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:root {
  --bg:       #121212;
  --bg-alt:   #161616;
  --card:     #1e1e1e;
  --card-alt: #242424;
  --ink:      #111111;
  --line:     rgba(255,255,255,0.09);
  --text:     #e4e4e4;
  --muted:    #9a9a9a;
  --white:    #ffffff;
  --sans:     'Poppins', -apple-system, sans-serif;
}

/* Root bg = top of the hero gradient so the iOS status-bar / safe-area
   zone beside the camera matches the hero (no mismatched strip). */
html { scroll-behavior: smooth; background: #1a1a1a; }

body {
  font-family: var(--sans);
  color: var(--text);
  background: #1a1a1a;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.page {
  max-width: 430px;
  margin: 0 auto;
  background: var(--bg);
  min-height: 100vh;
}

/* ── ABOUT ── */
.about-section {
  background: var(--bg);
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
}
.about-section .section-head,
.about-section .section-divider { padding-left: 28px; padding-right: 28px; }

/* Section heading (bright lead + muted rest) */
.section-head {
  font-family: var(--sans);
  font-weight: 400; font-size: clamp(24px, 7vw, 30px);
  line-height: 1.2; letter-spacing: -0.01em;
  color: var(--muted); margin: 0 0 6px;
}
.section-head strong { color: #fff; font-weight: 400; }

.section-divider {
  display: flex; align-items: center;
  margin-bottom: 20px;
}
.divider-accent { width: 28px; height: 2px; background: #fff; }
.divider-line { flex: 1; height: 1px; background: var(--line); }

/* Bio as a raised "bubble" card */
.about-body {
  margin: 0 28px;
  background: var(--card);
  border-radius: 26px;
  padding: 28px 26px;
}
.about-body p {
  font-size: 14px; line-height: 1.8;
  color: rgba(255,255,255,0.82);
  margin-bottom: 14px;
}
.about-body p:last-child { margin-bottom: 0; }
.about-body strong { font-weight: 600; color: #fff; }

/* Featured quote inside a bubble card */
.body-quote {
  margin: 18px 0;
  padding: 2px 0 2px 16px;
  border-left: 2px solid rgba(255,255,255,0.35);
}
.body-quote p {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 15.5px; line-height: 1.6;
  color: #fff;
  margin: 0 0 6px;
}
.body-quote cite {
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}

/* Alternate section background for rhythm between stacked sections */
.section-alt { background: var(--bg-alt); }

/* ── RECENT READS (swipeable cover row) ── */
.reads-track {
  display: flex; gap: 14px;
  padding: 4px 28px 6px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-left: 28px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.reads-track::-webkit-scrollbar { display: none; }
.read-card {
  flex: 0 0 auto;
  width: 168px;
  scroll-snap-align: start;
  background: var(--card);
  border-radius: 14px;
  padding: 12px;
}
.read-card img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 8px;
}

/* ── CLIENTS (logo grid) ── */
.clients {
  background: var(--bg);
  color: #fff;
  padding: 48px 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.client-carousel {
  position: relative;
  width: 100%;
  margin-top: 22px;
}

.client-track {
  position: relative;
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0 6px;
}
.client-track::-webkit-scrollbar { display: none; }

/* leading/trailing spacers so the first & last cards can centre */
.client-track::before,
.client-track::after {
  content: "";
  flex: 0 0 9%;
}

.client-card {
  position: relative;
  flex: 0 0 84%;
  scroll-snap-align: center;
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 26px;
}
.client-card img {
  max-width: 80%;
  max-height: 55%;
  object-fit: contain;
}
.client-card .client-icon {
  width: 64px; height: 64px;
  border-radius: 14px;
}
.client-card[data-variant="navy"] img:not(.client-icon) { max-height: 24px; }
.client-byline {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.04em;
}

/* Brand-coloured card variants */
.client-card[data-variant="cream"] { background: #f3ecdf; }
.client-card[data-variant="blue"]  { background: #e7edf8; }
.client-card[data-variant="slate"] { background: #2d3841; }
.client-card[data-variant="navy"]  { background: #1e293b; }

/* Dots */
.client-dots {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.client-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,0.22);
  cursor: pointer;
  padding: 0;
  transition: width 0.3s ease, background 0.3s ease;
}
.client-dot.is-active {
  width: 26px;
  background: #fff;
}
.client-dot:hover:not(.is-active) {
  background: rgba(255,255,255,0.45);
}

/* ── GET IN TOUCH (form bubble) ── */
.contact-section {
  background: var(--bg);
  padding: 52px 28px calc(44px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.contact-lead {
  font-size: 14px; line-height: 1.6; color: var(--muted);
  margin: 0 0 22px; max-width: 36ch;
}

/* raised form bubble, light fields */
.contact-form {
  background: var(--card);
  border-radius: 26px;
  padding: 26px 22px;
  display: flex; flex-direction: column; gap: 20px;
}
.cf-field { display: flex; flex-direction: column; gap: 8px; }
.cf-label {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.contact-form input,
.contact-form textarea {
  width: 100%; background: transparent; border: none;
  border-bottom: 1px solid rgba(255,255,255,0.22);
  color: #fff; font-family: var(--sans); font-size: 16px;
  padding: 8px 2px; outline: none; resize: none;
  transition: border-color 0.2s ease;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(255,255,255,0.4); }
.contact-form input:focus,
.contact-form textarea:focus { border-color: #fff; }
/* paint over the browser's yellow autofill fill */
.contact-form input:-webkit-autofill,
.contact-form input:-webkit-autofill:hover,
.contact-form input:-webkit-autofill:focus,
.contact-form textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--card) inset;
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  transition: background-color 5000s ease-in-out 0s;
}
.cf-submit {
  margin-top: 2px; padding: 13px; border: 1px solid rgba(255,255,255,0.18); border-radius: 12px;
  background: #111; color: #fff; font-family: var(--sans);
  font-size: 15px; font-weight: 600; cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease;
}
.cf-submit:hover { background: #1a1a1a; border-color: rgba(255,255,255,0.3); }
/* inline field errors (custom, replaces native browser bubbles) */
.cf-err { display: none; margin-top: 7px; font-size: 12px; line-height: 1.4; color: #d9a0a0; }
.cf-err.show { display: block; }
.contact-form .is-invalid { border-bottom-color: #d9a0a0; }

.cf-status { margin: 2px 0 0; text-align: center; font-size: 13px; line-height: 1.4; color: rgba(255,255,255,0.8); }
.cf-status:empty { display: none; }
.cf-status.is-error { color: #d9a0a0; }

/* Success panel, replaces the form once sent */
.cf-success {
  background: var(--card);
  border-radius: 26px;
  padding: 44px 26px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  animation: cf-pop 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.cf-success-check {
  width: 62px; height: 62px; border-radius: 50%;
  background: #fff; color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.cf-success-check svg { width: 30px; height: 30px; }
.cf-success-title { font-family: var(--sans); font-size: 22px; font-weight: 600; color: #fff; margin: 0; }
.cf-success-text { font-family: var(--sans); font-size: 14px; line-height: 1.6; color: rgba(255,255,255,0.75); margin: 0; max-width: 30ch; }
@keyframes cf-pop { from { opacity: 0; transform: scale(0.96) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }

/* Direct contact details under the form */
.contact-direct {
  display: flex; flex-direction: column; gap: 14px;
  margin-top: 24px;
}
.contact-direct-item {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; color: #fff;
  font-size: 14.5px; font-weight: 500;
  transition: color 0.2s ease;
}
.contact-direct-item svg { width: 18px; height: 18px; color: rgba(255,255,255,0.8); flex-shrink: 0; }
.contact-direct-item:hover { color: var(--muted); }

/* ── FOOTER ── */
.site-footer {
  background: #0d0d0d;
  color: #fff;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 30px;
  padding: 44px 24px calc(40px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}

.footer-legal {
  width: 100%; max-width: 560px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.footer-legal span, .footer-legal a {
  font-family: var(--sans); font-size: 11px; color: rgba(255,255,255,0.4); text-decoration: none;
}
.footer-legal a:hover { color: #fff; }

/* ============================================================
   PORTRAIT HERO  (namespaced .ph-*)
   Self-contained. White accents on near-black.
   ============================================================ */
.ph-hero {
  --ph-accent: #ffffff;
  position: relative;
  min-height: calc(100lvh + 6rem);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: 60px 24px 0; padding-top: max(env(safe-area-inset-top), 3.5rem);
  overflow: hidden; text-align: center; color: #fff;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255,255,255,0.06), transparent 55%),
    linear-gradient(180deg, #1a1a1a 0%, #0f0f0f 100%);
  border-bottom: 1px solid rgba(255,255,255,0.14);
}
@media (min-width: 768px) {
  .ph-hero { min-height: 100vh; justify-content: center; padding: 60px 24px; }
}

.ph-grain {
  position: absolute; inset: 0; opacity: 0.04; pointer-events: none; z-index: 0;
  background-image: url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='phn'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23phn)'/%3E%3C/svg%3E");
}
.ph-skew {
  position: absolute; top: 0; right: 0; width: 50%; height: 100%;
  background: rgba(255,255,255,0.03); transform: skewX(-8deg) translateX(25%);
  pointer-events: none; z-index: 0;
}
.ph-bar {
  position: absolute; left: 0; top: 25%; width: 4px; height: 128px;
  background: var(--ph-accent); pointer-events: none; z-index: 0;
}
@media (min-width: 768px) { .ph-bar { width: 6px; height: 192px; } }
.ph-spotlight {
  position: absolute; left: 50%; top: 50%; width: 36rem; height: 36rem;
  transform: translate(-50%,-50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,255,255,0.08), transparent 70%);
  opacity: 0.65; pointer-events: none; z-index: 0;
}

.ph-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  min-height: calc(100lvh - max(env(safe-area-inset-top), 3.5rem) - 6rem);
  animation: ph-fade-up 1s ease-out;
}
@media (min-width: 768px) {
  .ph-content { min-height: 0; }
}
.ph-photo {
  width: 168px; height: 168px; border-radius: 50%; overflow: hidden;
  border: 3px solid rgba(255,255,255,0.14); box-shadow: 0 18px 40px rgba(0,0,0,0.35);
  position: relative; z-index: 1; animation: ph-scale-in 0.8s ease-out 0.2s both;
}
.ph-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; transition: transform 0.4s ease; }
.ph-photo:hover img { transform: scale(1.05); }

.ph-text { display: flex; flex-direction: column; gap: 8px; }
.ph-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(26px, 7vw, 40px); font-weight: 400; letter-spacing: -0.01em;
  line-height: 1.1; color: #fff; margin: 0; white-space: nowrap;
  animation: ph-fade-up 0.8s ease-out 0.5s both;
}

.ph-cta { display: flex; justify-content: center; margin-top: 6px; animation: ph-fade-up 0.8s ease-out 0.8s both; }
.ph-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--sans); padding: 16px 34px; border-radius: 12px;
  font-size: 14px; font-weight: 600; letter-spacing: 0.02em; text-decoration: none; cursor: pointer;
  background: #1e1e1e; color: #fff; border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 12px 32px rgba(0,0,0,0.35); transition: all 0.25s ease;
}
.ph-btn svg { width: 18px; height: 18px; }
.ph-btn:hover { background: #262626; border-color: rgba(255,255,255,0.3);
  transform: translateY(-3px) scale(1.02); box-shadow: 0 16px 38px rgba(0,0,0,0.45); }
.ph-btn:active { transform: translateY(-1px) scale(0.99); }

.ph-scroll {
  position: absolute; bottom: max(8rem, calc(env(safe-area-inset-bottom) + 7.5rem));
  left: 0; right: 0; margin-inline: auto; width: fit-content;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.55); font-family: var(--sans);
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  animation: ph-fade-up 1s ease-out 1.2s both;
}
.ph-scroll-line { width: 2px; height: 36px; border-radius: 1px; position: relative; overflow: hidden;
  background: linear-gradient(to bottom, rgba(255,255,255,0.8), transparent); }
.ph-scroll-line::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 12px;
  background: #fff; border-radius: 1px; animation: ph-scroll-drop 1.5s ease-in-out infinite; }

@keyframes ph-fade-up { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ph-scale-in { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }
@keyframes ph-scroll-drop { 0% { top: 0; opacity: 1; } 100% { top: 100%; opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .ph-content, .ph-photo, .ph-name, .ph-cta, .ph-scroll { animation: none; }
}
