/* ============================================================
   Carolinas Plastic Surgery — warm-luxe site theme
   Layers an editorial, premium treatment on top of the CDAPS
   brand tokens (/styles.css). Cream + brand blue + green.
   ============================================================ */

:root {
  /* Warm surfaces */
  --cps-cream:      #F7F4ED;   /* primary warm background */
  --cps-cream-2:    #F1EADD;   /* deeper warm band */
  --cps-ivory:      #FBF9F4;
  --cps-linen:      #EDE6D7;

  /* Ink — soft warm charcoal-navy (reads premium, not clinical black) */
  --cps-ink:        #1E2C3A;
  --cps-ink-soft:   #3f4e5c;
  --cps-ink-mute:   #6a7682;

  /* Brand blues (from CDAPS) */
  --cps-blue:       var(--royal-blue);      /* #005AAA */
  --cps-blue-2:     var(--blue);            /* #4E8FCC */
  --cps-sky:        var(--sky-blue);        /* #A6C5DC */

  /* Green accent — deep forest for CTAs (per sitemap), sage for softs */
  --cps-green:      #17497F;
  --cps-green-hover:#0F3860;
  --cps-sage:       #BCCF82;
  --cps-sage-soft:  #E7EDD6;

  /* Hairlines & lines on warm ground */
  --cps-line:       #E1D8C6;
  --cps-line-2:     #D3C7B0;

  /* Editorial type */
  --cps-display:    'Hepta Slab', Georgia, serif;
  --cps-sans:       'Raleway', system-ui, sans-serif;

  --cps-shadow-sm:  0 2px 10px rgba(30, 44, 58, 0.06);
  --cps-shadow-md:  0 12px 34px rgba(30, 44, 58, 0.10);
  --cps-shadow-lg:  0 30px 70px rgba(30, 44, 58, 0.16);

  --cps-maxw:       1240px;
}

/* ---- Base ---- */
.cps {
  font-family: var(--cps-sans);
  color: var(--cps-ink-soft);
  background: var(--cps-ivory);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
.cps * { box-sizing: border-box; }

/* Editorial display headline — Hepta Slab, mixed case, tight */
.cps-display {
  font-family: var(--cps-display);
  font-weight: 700;
  color: var(--cps-ink);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
}
.cps-serif {
  font-family: var(--cps-display);
  font-weight: 600;
  color: var(--cps-ink);
}

/* Eyebrow / kicker — Raleway caps, wide track, blue */
.cps-eyebrow {
  font-family: var(--cps-sans);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
  color: var(--cps-blue);
  margin: 0;
}
.cps-eyebrow--green { color: var(--cps-green); }
.cps-eyebrow--light { color: var(--cps-sky); }

.cps-lead {
  font-size: 20px;
  line-height: 1.65;
  color: var(--cps-ink-soft);
  font-weight: 400;
}

/* Container */
.cps-container { max-width: var(--cps-maxw); margin: 0 auto; padding: 0 40px; }
.cps-narrow { max-width: 820px; margin: 0 auto; padding: 0 40px; }

/* Section rhythm */
.cps-section { padding: 104px 0; }
.cps-section--tight { padding: 72px 0; }

/* ---- Buttons (site-specific, premium) ---- */
.cps-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--cps-sans); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em; font-size: 12.5px;
  padding: 16px 30px; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; text-decoration: none; line-height: 1;
  transition: background .25s var(--ease-standard, ease), color .25s ease, border-color .25s ease, transform .2s ease, box-shadow .25s ease;
}
.cps-btn:active { transform: translateY(1px); }
.cps-btn--primary { background: var(--cps-blue); color: #fff; }
.cps-btn--primary:hover { background: #00478a; box-shadow: var(--cps-shadow-md); }
.cps-btn--green { background: var(--cps-green); color: #fff; }
.cps-btn--green:hover { background: var(--cps-green-hover); box-shadow: var(--cps-shadow-md); }
.cps-btn--ghost { background: transparent; color: var(--cps-ink); border-color: var(--cps-line-2); }
.cps-btn--ghost:hover { border-color: var(--cps-ink); }
.cps-btn--light { background: rgba(255,255,255,0.14); color: #fff; border-color: rgba(255,255,255,0.4); backdrop-filter: blur(4px); }
.cps-btn--light:hover { background: rgba(255,255,255,0.24); }
.cps-btn--onlight { background: #fff; color: var(--cps-ink); }
.cps-btn--onlight:hover { box-shadow: var(--cps-shadow-md); }

.cps-textlink {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px;
  color: var(--cps-blue); text-decoration: none; cursor: pointer;
  transition: gap .2s ease, color .2s ease;
}
.cps-textlink:hover { gap: 12px; color: #00478a; }
.cps-textlink--green { color: var(--cps-green); }
.cps-textlink--light { color: #fff; }

/* ---- Photo placeholder (stock-style) ---- */
.cps-photo {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(166,197,220,0.55), transparent 60%),
    linear-gradient(150deg, #dfe8ef 0%, #eef2ec 55%, #efe7d7 120%);
  display: flex; align-items: center; justify-content: center;
}
.cps-photo__label {
  position: absolute; bottom: 14px; left: 16px;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(30,44,58,0.5); font-weight: 600;
}
.cps-photo__mark { opacity: 0.5; }

/* ---- Hover image zoom (cards with overflow clipping) ---- */
.cps-photo { transition: transform .9s cubic-bezier(0.16, 1, 0.3, 1); }
.cps-card--hover { overflow: hidden; }
.cps-card--hover:hover .cps-photo { transform: scale(1.06); }

/* ---- Ken Burns hero ---- */
.cps-kenburns { position: absolute; inset: 0; animation: cps-kb 22s ease-in-out infinite alternate; }
@keyframes cps-kb { from { transform: scale(1.03); } to { transform: scale(1.12); } }

/* ---- Hero rating pill ---- */
.cps-ratingpill {
  display: inline-flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(6px); border-radius: 999px; padding: 9px 18px;
}

/* ---- Short accent rule ---- */
.cps-accent { display: inline-block; width: 40px; height: 2px; background: var(--cps-green); vertical-align: middle; }

/* ---- Scroll cue ---- */
.cps-scrollcue { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; color: rgba(255,255,255,0.7); }
.cps-scrollcue span { font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; }
.cps-scrollcue .cps-bounce { animation: cps-bob 2.2s ease-in-out infinite; }
@keyframes cps-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

@media (prefers-reduced-motion: reduce) {
  .cps-kenburns, .cps-bounce { animation: none !important; }
}

/* Motion tweak — disable all animation when toggled off */
body.cps-nomotion .cps-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
body.cps-nomotion .cps-kenburns, body.cps-nomotion .cps-bounce { animation: none !important; }
body.cps-nomotion .cps-card--hover:hover .cps-photo { transform: none !important; }

/* ---- Cards ---- */
.cps-card {
  background: #fff; border: 1px solid var(--cps-line);
  border-radius: 18px; box-shadow: var(--cps-shadow-sm);
  transition: transform .3s var(--ease-standard, ease), box-shadow .3s ease;
}
.cps-card--hover:hover { transform: translateY(-4px); box-shadow: var(--cps-shadow-md); }

/* ---- Scroll reveal ---- */
.cps-reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(0.16,1,0.3,1), transform .7s cubic-bezier(0.16,1,0.3,1); will-change: opacity, transform; }
.cps-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .cps-reveal { opacity: 1 !important; transform: none !important; transition: none; }
}

/* ---- Nav ---- */
.cps-nav-link {
  font-family: var(--cps-sans); font-weight: 600; font-size: 13px;
  letter-spacing: 0.05em; color: var(--cps-ink-soft);
  text-decoration: none; cursor: pointer; padding: 6px 0; position: relative;
  transition: color .2s ease;
}
.cps-nav-link:hover, .cps-nav-link.is-active { color: var(--cps-blue); }
.cps-nav-link.is-active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--cps-blue);
}

/* Dividers / rule */
.cps-rule { height: 1px; background: var(--cps-line); border: 0; }

/* Star row */
.cps-stars { color: #C9A54A; letter-spacing: 2px; font-size: 15px; }

/* ---- Elevated icon container: soft ringed circle in the accent tone ---- */
.cps-iconwrap {
  display: flex; align-items: center; justify-content: center; flex: none;
  border-radius: 999px;
  background: linear-gradient(150deg, #ffffff 0%, #eef3f8 100%);
  box-shadow: inset 0 0 0 1px rgba(23,73,127,0.16), 0 8px 20px rgba(30,44,58,0.10);
  color: var(--cps-green);
}
.cps-iconwrap--onlight { background: linear-gradient(150deg, #ffffff 0%, #f4f0e6 100%); }

/* ============================================================
   RESPONSIVE — genuine mobile layout, not a shrunk desktop
   ============================================================ */
.cps-hamburger { display: none; }

.consult-form-wrap { position: relative; min-height: 460px; }
.consult-form-wrap iframe { height: 460px; opacity: 0; transition: opacity .25s ease; display: block; }
.consult-form-wrap.is-loaded iframe { opacity: 1; }
.consult-form-wrap:not(.is-loaded)::before {
  content: ""; position: absolute; inset: 0; border-radius: 10px;
  background: linear-gradient(90deg, #F7F4ED 25%, #EFEBE2 50%, #F7F4ED 75%);
  background-size: 200% 100%; animation: consultShimmer 1.2s infinite;
}
@keyframes consultShimmer { to { background-position: -200% 0; } }

@media (max-width: 960px) {
  .cps-container, .cps-narrow { padding-left: 26px; padding-right: 26px; }
  .cps-section { padding: 72px 0 !important; }
  .cps-consult-col { max-width: 100% !important; padding: 0 32px !important; }
  .cps-section--tight { padding: 56px 0 !important; }
  /* collapse desktop nav → hamburger */
  .cps-desktop-nav { display: none !important; }
  .cps-hamburger { display: inline-flex !important; align-items: center; justify-content: center; }
  /* multi-column grids → two-up */
  .cps-grid { grid-template-columns: 1fr 1fr !important; }
  .cps-split { grid-template-columns: 1fr !important; }
  .cps-trust { grid-template-columns: repeat(2, 1fr) !important; gap: 22px 18px !important; padding-top: 26px !important; padding-bottom: 26px !important; }
  .cps-cols { column-count: 2 !important; }
  /* stat / rating strips: keep readable, drop dividers when wrapped */
  .cps-statstrip { grid-template-columns: repeat(2, 1fr) !important; gap: 32px 0 !important; }
  .cps-statstrip > * { border-left: none !important; }
}

@media (max-width: 620px) {
  .consult-form-wrap { min-height: 640px; }
  .consult-form-wrap iframe { height: 640px; }
  .cps-container, .cps-narrow { padding-left: 20px; padding-right: 20px; }
  .cps-section { padding: 54px 0 !important; }
  .cps-consult-col { padding: 0 !important; }
  .cps-consult-card { padding: 24px 16px !important; border: none !important; border-radius: 0 !important; }
  .cps-grid, .cps-trust { grid-template-columns: 1fr !important; }
  .cps-statstrip { grid-template-columns: 1fr 1fr !important; }
  .cps-cols { column-count: 1 !important; }
  .cps-hide-sm { display: none !important; }
  .cps-show-sm { display: inline !important; }
  /* tighten hero + big display type on phones */
  .cps-heroband { min-height: 88vh !important; }
  /* shrink header lockup so it never clips behind the hamburger */
  .cps-lockup-seal { height: 40px !important; }
  .cps-lockup-name { font-size: 17px !important; }
  .cps-lockup-sub { font-size: 9px !important; letter-spacing: 0.14em !important; }
  /* hero stacks: photo on top, text below */
  .cps-herogrid { grid-template-columns: 1fr !important; min-height: 0 !important; gap: 8px !important; }
  .cps-hero-photo-col { order: -1; }
  .cps-hero-arch { height: 56vh !important; min-height: 360px !important; }
  .cps-hero-text { padding: 40px 24px 52px !important; max-width: none !important; margin: 0 !important; }
  /* keep floating chips fully on-screen on phones */
  .cps-hero-chip--rating { right: 10px !important; top: 14px !important; }
  .cps-hero-chip--cert { left: 10px !important; bottom: 14px !important; padding: 12px 15px !important; }
  .cps-hero-chip--cert .cps-iconwrap { width: 38px !important; height: 38px !important; }
}

/* Hero decorative + motion */
.cps-hero-arch { border-radius: 280px 280px 28px 28px; overflow: hidden; box-shadow: var(--cps-shadow-lg); }
@keyframes cps-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.cps-float { animation: cps-float 7s ease-in-out infinite; }
/* Arch draws up on load (clip-path + opacity, no transform conflict with float) */
@keyframes cps-arch-in { from { clip-path: inset(16% 0 0 0); opacity: 0; } to { clip-path: inset(0 0 0 0); opacity: 1; } }
.cps-hero-arch { animation: cps-arch-in 1.15s cubic-bezier(0.16, 1, 0.3, 1) both; }
/* Paper-grain texture for print-luxe depth */
.cps-grain { position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: 0.5; mix-blend-mode: multiply;
  background-image: url("/assets/textures/grain.png"); background-size: 140px 140px; background-repeat: repeat; }
.cps-hero-seal { position: absolute; pointer-events: none; opacity: 0.05; z-index: 0; }
@keyframes cps-chip-in { from { opacity: 0; transform: translateY(10px) scale(0.94); } to { opacity: 1; transform: none; } }
.cps-hero-chip { animation: cps-chip-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.9s both; }
@media (prefers-reduced-motion: reduce) { .cps-float, .cps-hero-arch, .cps-hero-chip { animation: none; } }
@media (max-width: 400px) {
  .cps-lockup-seal { height: 34px !important; }
  .cps-lockup-name { font-size: 15px !important; }
  .cps-lockup-sub { font-size: 8px !important; letter-spacing: 0.1em !important; }
}

/* Mobile nav drawer */
.cps-drawer { position: fixed; inset: 0; z-index: 300; }
.cps-drawer-scrim { position: absolute; inset: 0; z-index: 1; background: rgba(20,32,45,0.5); backdrop-filter: blur(3px); animation: cps-fade .3s ease; }
.cps-drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 2; height: 100%; width: min(88vw, 380px);
  background: #FBF9F4; box-shadow: var(--cps-shadow-lg);
  padding: 22px 26px 32px; display: flex; flex-direction: column; gap: 2px;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  animation: cps-slidein .34s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes cps-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cps-slidein { from { transform: translateX(100%); } to { transform: none; } }
.cps-drawer-link {
  padding: 15px 4px; font-family: var(--cps-display); font-weight: 600; font-size: 22px;
  color: var(--cps-ink); border-bottom: 1px solid var(--cps-line); cursor: pointer;
  transition: color .2s ease, padding-left .2s ease;
}
.cps-drawer-link:hover { color: var(--cps-blue); padding-left: 10px; }

/* ---- Accessibility: visible keyboard focus ---- */
.cps-btn:focus-visible,
.cps-nav-link:focus-visible,
.cps-drawer-link:focus-visible,
.cps-card--hover:focus-visible,
.cps-textlink:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--cps-blue);
  outline-offset: 3px;
  border-radius: 5px;
}
.cps-card--hover:focus-visible { outline-offset: 2px; }


/* ---- WCAG 2.2 AA layer ---- */
:root { --cps-ink-mute: #56626E; }
html { scroll-padding-top: 108px; }
.cps-click { cursor: pointer; }
.cps-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.cps-skip { position: fixed; top: -120px; left: 16px; z-index: 1000; background: #fff; color: var(--cps-ink); font-family: var(--cps-sans); font-weight: 700; font-size: 15px; padding: 12px 18px; border-radius: 10px; border: 2px solid var(--cps-blue); text-decoration: none; transition: top .15s ease; }
.cps-skip:focus { top: 16px; }
#main:focus, #main h1:focus { outline: none; }
footer :focus-visible { outline-color: #fff !important; }
[role="slider"]:focus-visible { outline: none; }
[role="slider"]:focus-visible > div:last-child { box-shadow: 0 0 0 3px var(--cps-blue), 0 0 0 6px #fff; }
.cps-kenburns { animation-iteration-count: 1; animation-duration: 5s; }
.cps-scrollcue .cps-bounce { animation-iteration-count: 2; }
.cps-float { animation-iteration-count: 1; animation-duration: 4.5s; }
@media (max-width: 960px) { html { scroll-padding-top: 126px; } }
.cps-show-sm { display: none; }
@media (prefers-reduced-motion: reduce) {
  .cps-float, .cps-kenburns, .cps-bounce, .consult-form-wrap::before { animation: none !important; }
  .cps-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  html { scroll-behavior: auto !important; }
}

/* Procedure FAQ accordion */
.cps-faq summary::-webkit-details-marker { display: none; }
.cps-faq summary:focus-visible { outline: 3px solid var(--cps-blue); outline-offset: 4px; border-radius: 6px; }
.cps-faq summary span[role="img"] { transition: transform .2s ease; flex: none; margin-top: 3px; }
.cps-faq[open] summary span[role="img"] { transform: rotate(180deg); }
