/* ==========================================================================
   Tiny Pebble — site styles
   Fonts: Sora (display/headings) · Poppins (UI/body) · Fraunces (editorial voice)
   Palette from Adobe Color brief.
   ========================================================================== */

:root {
  /* --- Brand palette ------------------------------------------------------ */
  --wine:   #6A2C2E;   /* primary — logo, key CTAs               */
  --wine-d: #521f21;   /* darker wine for hovers                 */
  --teal:   #264653;   /* structural — nav, dark sections, text  */
  --teal-d: #1b333c;
  --olive:  #908763;   /* accent — links, ripples, secondary     */
  --olive-d:#756c4c;
  --cream:  #F0E1D1;   /* warm background                        */
  --grey:   #E8E8E8;   /* neutral background / borders           */
  --ink:    #20292e;   /* body text                              */
  --white:  #ffffff;

  /* --- Type roles --------------------------------------------------------- */
  --font-display: "Sora", system-ui, sans-serif;      /* h1/h2, hero        */
  --font-ui:      "Poppins", system-ui, sans-serif;   /* body, nav, buttons */
  --font-voice:   "Fraunces", Georgia, serif;         /* eyebrows, story    */

  /* --- Ripple (overridden per section) ------------------------------------ */
  --tp-ripple: var(--olive);
  --tp-halo:   rgba(240, 225, 209, 0);

  --radius: 14px;
  --shadow-soft: 0 10px 30px rgba(38, 70, 83, 0.10);
  --ease-out-back: cubic-bezier(.34, 1.4, .5, 1);
}

/* --- Base ----------------------------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .display { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; }
h4, h5, h6 { font-family: var(--font-ui); font-weight: 600; }
a { color: var(--olive-d); text-decoration: none; }
a:hover { color: var(--wine); }
.section { padding: clamp(4rem, 9vw, 7.5rem) 0; }
.container-tp { width: min(1120px, 92%); margin-inline: auto; }

/* Cairn marker — stacked pebbles = "you're on the right path".
   A secondary motif: use sparingly (currently Approach head + 404 only). */
.tp-cairn { display: block; width: 42px; height: auto; margin-bottom: .9rem; }
.tp-cairn .c1 { fill: var(--teal); }
.tp-cairn .c2 { fill: var(--olive); }
.tp-cairn .c3 { fill: var(--wine); }

/* Editorial eyebrow — set in the voice face, small caps-ish tracking */
.eyebrow {
  font-family: var(--font-voice);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--olive-d);
  letter-spacing: .01em;
  margin-bottom: .5rem;
}

/* --- Buttons -------------------------------------------------------------- */
.btn-tp {
  font-family: var(--font-ui);
  font-weight: 600;
  border-radius: 999px;
  padding: .8rem 1.6rem;
  border: 1.5px solid transparent;
  transition: transform .18s var(--ease-out-back), background .2s, color .2s, border-color .2s;
  position: relative;
  overflow: hidden;
}
.btn-tp:active { transform: scale(.97); }
.btn-primary-tp { background: var(--wine); color: #fff; }
.btn-primary-tp:hover { background: var(--wine-d); color: #fff; }
.btn-ghost-tp { background: transparent; color: var(--teal); border-color: rgba(38,70,83,.25); }
.btn-ghost-tp:hover { border-color: var(--olive); color: var(--olive-d); }
.on-dark .btn-ghost-tp { color: var(--cream); border-color: rgba(240,225,209,.35); }
.on-dark .btn-ghost-tp:hover { border-color: var(--olive); color: #fff; }

/* Button ripple flash on click */
.btn-tp::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.5); opacity: 0; transform: scale(1);
  pointer-events: none;
}
.btn-tp:active::after { animation: btn-ripple .5s ease-out; }
@keyframes btn-ripple { from { opacity:.6; transform: scale(1);} to { opacity:0; transform: scale(40);} }

/* ==========================================================================
   Ripple pebble logo
   ========================================================================== */
.tp-logo { display: inline-flex; align-items: center; gap: .6rem; }
.tp-pebble { display: block; overflow: visible; }
.tp-logo--nav .tp-pebble { width: 34px; height: 37px; }
.tp-logo--hero .tp-pebble { width: clamp(120px, 20vw, 168px); height: auto; }
.tp-logo--foot .tp-pebble { width: 30px; height: 33px; }

.tp-body   { filter: drop-shadow(0 6px 12px rgba(0,0,0,.18)); }
.tp-gloss  { fill: rgba(240,225,209,.42); }
.tp-speck  { fill: rgba(240,225,209,.16); }
.tp-halo   { fill: var(--tp-halo); }

.tp-ring {
  fill: none;
  stroke: var(--tp-ripple);
  stroke-width: 2.5;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

/* Wordmark lockup */
.tp-wordmark { font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.tp-logo--nav .tp-wordmark { font-size: 1.28rem; color: var(--teal); }
.on-dark .tp-logo--nav .tp-wordmark,
.tp-logo--foot .tp-wordmark { color: var(--cream); font-size: 1.15rem; }
.tp-wordmark .w-tiny   { color: var(--olive); }
.on-dark .tp-wordmark .w-tiny { color: var(--olive); }

/* Load-in: pebble drops + one ripple */
@keyframes peb-drop {
  0%   { transform: translateY(-46px) scaleY(.86) scaleX(1.1); opacity: 0; }
  55%  { transform: translateY(0)     scaleY(.94) scaleX(1.05); opacity: 1; }
  72%  { transform: translateY(-10px) scaleY(1.03) scaleX(.98); }
  100% { transform: translateY(0)     scale(1); }
}
@keyframes ring-out {
  0%   { opacity: .55; transform: scale(1); }
  100% { opacity: 0;   transform: scale(2.4); }
}
.tp-logo--hero .tp-pebble { animation: peb-drop 1s var(--ease-out-back) both; }
.tp-logo--hero.is-loaded .tp-ring-1 { animation: ring-out 2.6s ease-out .9s infinite; }
.tp-logo--hero.is-loaded .tp-ring-2 { animation: ring-out 2.6s ease-out 1.77s infinite; }
.tp-logo--hero.is-loaded .tp-ring-3 { animation: ring-out 2.6s ease-out 2.64s infinite; }

/* Hover ripple on nav + footer logos */
.tp-logo--nav:hover .tp-ring-1,
.tp-logo--foot:hover .tp-ring-1 { animation: ring-out 1s ease-out; }
.tp-logo--nav:hover .tp-ring-2,
.tp-logo--foot:hover .tp-ring-2 { animation: ring-out 1s ease-out .18s; }
.tp-logo--nav:hover .tp-pebble,
.tp-logo--foot:hover .tp-pebble { transform: scale(1.06); transition: transform .5s var(--ease-out-back); }

/* Nav logo idle show — main.js randomly applies one .anim-* class every
   few seconds, then removes it so the same animation can replay later. */
.tp-shine { fill: rgba(240,225,209,.5); opacity: 0; }

@keyframes shimmer-sweep {
  0%   { opacity: 0;  transform: translateX(-96px) skewX(-16deg); }
  18%  { opacity: .7; }
  82%  { opacity: .7; }
  100% { opacity: 0;  transform: translateX(96px) skewX(-16deg); }
}
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}
@keyframes float-tilt {
  0%, 100% { transform: translateY(0) rotate(0); }
  30%      { transform: translateY(-5px) rotate(-5deg); }
  70%      { transform: translateY(-2px) rotate(4deg); }
}

.tp-logo--nav.anim-ripple .tp-ring-1  { animation: ring-out 1s ease-out; }
.tp-logo--nav.anim-ripple .tp-ring-2  { animation: ring-out 1s ease-out .18s; }
.tp-logo--nav.anim-shimmer .tp-shine  { animation: shimmer-sweep 1.5s ease-in-out; }
.tp-logo--nav.anim-drop .tp-pebble    { animation: peb-drop .9s var(--ease-out-back); }
.tp-logo--nav.anim-drop .tp-ring-1    { animation: ring-out 1.1s ease-out .75s; }
.tp-logo--nav.anim-breathe .tp-pebble { animation: breathe 2.6s ease-in-out 2; }
.tp-logo--nav.anim-float .tp-pebble   { animation: float-tilt 3s ease-in-out; }

/* ==========================================================================
   Navbar
   ========================================================================== */
.tp-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1030;
  padding: 1.1rem 0;
  transition: background .3s, box-shadow .3s, padding .3s;
  background: transparent;
}
.tp-nav.scrolled {
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(38,70,83,.07);
  padding: .7rem 0;
}
.tp-nav.scrolled .nav-link-tp { color: var(--teal); }
.tp-nav .nav-inner { display: flex; align-items: center; justify-content: space-between; }
.tp-nav .nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-link-tp {
  font-family: var(--font-ui); font-weight: 500; font-size: .98rem;
  color: var(--cream); position: relative; padding: .2rem 0;
}
.nav-link-tp::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--olive); transition: width .25s ease;
}
.nav-link-tp:hover { color: var(--olive); }
.tp-nav.scrolled .nav-link-tp:hover { color: var(--wine); }
.nav-link-tp:hover::after { width: 100%; }
.tp-nav.scrolled .tp-wordmark { color: var(--teal); }
.tp-nav.scrolled .tp-halo { fill: rgba(38,70,83,0); }

.nav-toggle { display: none; background: none; border: 0; color: var(--cream); font-size: 1.6rem; cursor: pointer; }
.tp-nav.scrolled .nav-toggle { color: var(--teal); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .tp-nav .nav-links {
    position: absolute; top: 100%; right: 4%; left: 4%;
    flex-direction: column; gap: 1rem; align-items: flex-start;
    background: rgba(255,255,255,.98); backdrop-filter: blur(10px);
    padding: 1.4rem 1.6rem; border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    max-height: 0; overflow: hidden; opacity: 0; pointer-events: none;
    transition: max-height .3s, opacity .3s, padding .3s;
  }
  .tp-nav .nav-links.open { max-height: 420px; opacity: 1; pointer-events: auto; }
  .tp-nav .nav-links .nav-link-tp { color: var(--teal); }
  .tp-nav .nav-links .btn-tp { margin-top: .4rem; }
}

/* ==========================================================================
   Hero — dark teal, ripple visible in olive/cream
   ========================================================================== */
.hero {
  --tp-ripple: var(--olive);
  --tp-halo: rgba(240, 225, 209, 0.16);
  background: radial-gradient(120% 120% at 70% 20%, #2e5462 0%, var(--teal) 45%, var(--teal-d) 100%);
  color: var(--cream);
  padding: clamp(8rem, 16vw, 11rem) 0 clamp(4rem, 8vw, 6rem);
  position: relative; overflow: hidden;
}
.hero .container-tp { display: grid; grid-template-columns: 1.15fr .85fr; gap: 2.5rem; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(2.4rem, 5.5vw, 4rem); }
.hero h1 .accent { color: var(--olive); }
.hero .lead { font-size: 1.18rem; color: rgba(240,225,209,.9); max-width: 46ch; margin: 1.3rem 0 2rem; }
.hero .hero-art { display: flex; justify-content: center; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero .scroll-hint { position: absolute; left: 50%; bottom: 1.4rem; transform: translateX(-50%); color: rgba(240,225,209,.55); font-size: 1.4rem; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 0%,100%{ transform: translate(-50%,0);} 50%{ transform: translate(-50%,8px);} }
@media (max-width: 860px) {
  .hero .container-tp { grid-template-columns: 1fr; text-align: center; }
  .hero .hero-art { order: -1; }
  .hero-cta { justify-content: center; }
  .hero .lead { margin-inline: auto; }
}

/* ==========================================================================
   Services
   ========================================================================== */
.services { background: var(--cream); }
.section-head { max-width: 640px; margin-bottom: 3rem; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); color: var(--teal); }
.section-head p { color: #55635b; margin-top: .6rem; }

.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
@media (max-width: 860px) { .svc-grid { grid-template-columns: 1fr; } }
.svc-card {
  background: #fff; border-radius: var(--radius); padding: 2rem 1.8rem;
  border: 1px solid rgba(38,70,83,.08);
  transition: transform .3s var(--ease-out-back), box-shadow .3s;
}
.svc-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); }
.svc-ic {
  width: 58px; height: 58px; border-radius: 16px;
  display: grid; place-items: center; font-size: 1.7rem; margin-bottom: 1.1rem;
}
.svc-ic.a { background: rgba(106,44,46,.10); color: var(--wine); }
.svc-ic.b { background: rgba(144,135,99,.16); color: var(--olive-d); }
.svc-ic.c { background: rgba(38,70,83,.10); color: var(--teal); }
.svc-card:hover .svc-ic i { animation: ic-pop .5s var(--ease-out-back); }
@keyframes ic-pop { 0%{ transform: scale(1);} 40%{ transform: scale(1.25) rotate(-8deg);} 100%{ transform: scale(1);} }
.svc-card h3 { font-size: 1.28rem; color: var(--teal); margin-bottom: .5rem; }
.svc-card p { color: #5b6660; font-size: .98rem; }
.svc-card ul { list-style: none; padding: 0; margin: 1rem 0 0; }
.svc-card li { font-size: .92rem; color: #6a746e; padding-left: 1.3rem; position: relative; margin-bottom: .3rem; }
.svc-card li::before { content: "\eb1b"; font-family: "tabler-icons"; position: absolute; left: 0; color: var(--olive); }

/* ==========================================================================
   Approach — real 3-step sequence (numbering earns its place here)
   ========================================================================== */
.approach { background: #fff; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; counter-reset: step; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 2rem 1.6rem; border-radius: var(--radius); background: var(--grey); }
.step .num {
  font-family: var(--font-display); font-weight: 700; font-size: 2.4rem;
  color: rgba(38,70,83,.16); line-height: 1;
}
.step h3 { font-size: 1.2rem; color: var(--teal); margin: .5rem 0; }
.step p { font-size: .95rem; color: #5b6660; }

/* ==========================================================================
   About — editorial voice (Fraunces)
   ========================================================================== */
.about { background: var(--teal); color: var(--cream); --tp-ripple: var(--cream); }
.about .container-tp { display: grid; grid-template-columns: .9fr 1.1fr; gap: 3rem; align-items: center; }
@media (max-width: 860px) { .about .container-tp { grid-template-columns: 1fr; } }
.about h2 { color: #fff; font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
.about .voice {
  font-family: var(--font-voice); font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  line-height: 1.5; color: var(--cream); font-weight: 400;
}
.about .voice em { color: var(--olive); font-style: italic; }
.about .about-art { display: grid; place-items: center; }
.about .about-art .tp-pebble { width: clamp(140px, 22vw, 200px); height: auto; }
.about .about-art { --tp-ripple: var(--olive); --tp-halo: rgba(240,225,209,.14); }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact { background: var(--cream); }
.contact .container-tp { display: grid; grid-template-columns: .85fr 1.15fr; gap: 3rem; }
@media (max-width: 860px) { .contact .container-tp { grid-template-columns: 1fr; } }
.contact h2 { color: var(--teal); font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
.contact .lead { color: #55635b; margin: .8rem 0 1.6rem; }
.contact .direct a { color: var(--wine); font-weight: 600; }
.contact .direct div { margin-bottom: .5rem; display:flex; align-items:center; gap:.5rem; }

.tp-form { background: #fff; padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.tp-form label { font-weight: 500; font-size: .9rem; color: var(--teal); margin-bottom: .35rem; display: block; }
.tp-field {
  width: 100%; font-family: var(--font-ui); font-size: 1rem;
  padding: .8rem 1rem; border: 1.5px solid rgba(38,70,83,.16); border-radius: 10px;
  background: #fdfcfa; transition: border-color .2s, box-shadow .2s; margin-bottom: 1.1rem;
}
.tp-field:focus { outline: none; border-color: var(--olive); box-shadow: 0 0 0 3px rgba(144,135,99,.18); }
.tp-field.invalid { border-color: #b23b3b; box-shadow: 0 0 0 3px rgba(178,59,59,.14); }
/* Honeypot — hidden from humans, visible to bots */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .82rem; color: #7a827c; display: flex; align-items: center; gap: .4rem; margin-top: .3rem; }
.form-status { margin-top: 1rem; font-size: .95rem; display: none; align-items: center; gap: .5rem; }
.form-status.show { display: flex; }
.form-status.ok { color: #2c7a4b; }
.form-status.err { color: #b23b3b; }
.form-status i { animation: ic-pop .5s var(--ease-out-back); }

/* ==========================================================================
   Footer
   ========================================================================== */
.tp-foot { background: var(--teal-d); color: rgba(240,225,209,.75); --tp-ripple: var(--olive); padding: 3.5rem 0 2rem; }
.tp-foot .foot-top { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; align-items: flex-start; }
.tp-foot .foot-tag { max-width: 34ch; margin-top: 1rem; font-size: .95rem; }
.tp-foot .foot-col h5 { color: var(--cream); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .9rem; }
.tp-foot .foot-col a { color: rgba(240,225,209,.75); display: block; margin-bottom: .5rem; font-size: .95rem; }
.tp-foot .foot-col a:hover { color: var(--olive); }
.tp-foot .foot-socials { display: flex; gap: .8rem; margin-top: .8rem; }
.tp-foot .foot-socials a {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(240,225,209,.2); color: var(--cream); font-size: 1.1rem; transition: .2s;
}
.tp-foot .foot-socials a:hover { background: var(--olive); border-color: var(--olive); color: #fff; }
.tp-foot .foot-bottom { border-top: 1px solid rgba(240,225,209,.12); margin-top: 2.5rem; padding-top: 1.4rem; font-size: .85rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ==========================================================================
   Scroll reveal
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s var(--ease-out-back); }
.reveal.in-view { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }

/* ==========================================================================
   404 / status pages — animated result icons
   ========================================================================== */
.status-page {
  min-height: 100vh; display: grid; place-items: center; text-align: center;
  background: radial-gradient(120% 120% at 50% 15%, #2e5462 0%, var(--teal) 50%, var(--teal-d) 100%);
  color: var(--cream); --tp-ripple: var(--olive); --tp-halo: rgba(240,225,209,.16); padding: 2rem;
}
.status-page h1 { color: #fff; font-size: clamp(2.4rem, 7vw, 4.5rem); margin: 1rem 0 .4rem; }
.status-page .code { font-family: var(--font-display); font-weight: 700; font-size: clamp(4rem, 16vw, 9rem); color: var(--olive); line-height: .9; letter-spacing: -.03em; }
.status-page p { color: rgba(240,225,209,.85); max-width: 44ch; margin: 0 auto 2rem; }
/* Cairn on dark: cream stones, fading with the stack */
.status-page .tp-cairn { width: 54px; margin: 1rem auto 1.2rem; }
.status-page .tp-cairn .c1 { fill: rgba(240,225,209,.9); }
.status-page .tp-cairn .c2 { fill: rgba(240,225,209,.6); }
.status-page .tp-cairn .c3 { fill: var(--olive); }
.status-page .tp-logo--hero .tp-pebble { width: 96px; }

/* Coming-soon holding page (served via the .htaccess COMING-SOON block) */
.coming-soon .tp-logo--hero .tp-pebble { width: 120px; }
.coming-soon .soon-wordmark { font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; font-size: 3.4rem; color: var(--cream); margin-top: 2rem; }
.coming-soon .soon-wordmark .w-tiny { color: var(--olive); }
.coming-soon h1 { font-size: clamp(2rem, 5.5vw, 3.2rem); }
.coming-soon .soon-mail { color: var(--cream); font-weight: 600; border-bottom: 1.5px solid var(--olive); padding-bottom: 2px; }
.coming-soon .soon-mail:hover { color: var(--olive); }

/* ==========================================================================
   Team page
   ========================================================================== */
.team-hero { background: var(--teal); color: var(--cream); padding: 9rem 0 4rem; text-align: center; }
.team-hero h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.4rem); }
.team-hero p { color: rgba(240,225,209,.85); max-width: 52ch; margin: 1rem auto 0; }
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
@media (max-width: 860px) { .team-grid { grid-template-columns: 1fr; } }
.team-card { background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(38,70,83,.08); transition: transform .3s var(--ease-out-back), box-shadow .3s; }
.team-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); }
.team-photo { aspect-ratio: 1 / 1; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; color: #fff; }
.team-photo.p1 { background: var(--wine); } .team-photo.p2 { background: var(--olive); } .team-photo.p3 { background: var(--teal); }
.team-body { padding: 1.4rem; }
.team-body h3 { color: var(--teal); font-size: 1.2rem; }
.team-body .role { color: var(--olive-d); font-weight: 500; font-size: .92rem; margin-bottom: .6rem; }
.team-body p { font-size: .93rem; color: #5b6660; }

/* ==========================================================================
   Accessibility — reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
:focus-visible { outline: 3px solid var(--olive); outline-offset: 2px; border-radius: 4px; }

/* spinner for form submit */
@keyframes spin { to { transform: rotate(360deg); } }
