/* ═══════════════════════════════════════════════
   TRITON Coral Treatment Dosing Calculator — Page-Specific Styles
   Global design system: ../global.css
   Prefix: ctd- (coral treatment dosing)
   ═══════════════════════════════════════════════ */


/* ════════════════════════════════════════════════
   HERO — Compact static hero (tool page, no video)
   ════════════════════════════════════════════════ */
.hero-tool{
  min-height:60vh;height:auto;
  display:flex;flex-direction:column;justify-content:flex-end;
  background:
    radial-gradient(ellipse 70% 55% at 70% 35%, rgba(0,100,102,.3) 0%, transparent 60%),
    radial-gradient(ellipse 45% 50% at 15% 75%, rgba(3,47,79,.5) 0%, transparent 55%),
    var(--bp);
  padding-top:clamp(7rem,12vw,10rem)
}
.hero-tool .hero-ct{padding-bottom:clamp(4rem,6vw,6rem)}
.hero-tool .hero-t{font-size:clamp(2.8rem,6.5vw,5.5rem);max-width:18ch}
.hero-tool .hero-sub{max-width:60ch}

/* Hero layout — text + product 50/50 grid */
.hero-tool .hero-ct{
  display:grid;
  grid-template-columns:1fr 1fr;
  align-items:end;
  gap:clamp(2rem,4vw,5rem)
}
.hero-tool-text{min-width:0;align-self:end}
.hero-tool-product{
  position:relative;z-index:2;
  align-self:center;justify-self:start
}
.hero-tool-product img{
  max-height:55vh;width:auto;
  object-fit:contain;
  filter:drop-shadow(0 20px 60px rgba(0,0,0,.5));
  transition:transform .6s cubic-bezier(.16,1,.3,1)
}
.hero-tool-product:hover img{transform:translateY(-8px)}


/* ════════════════════════════════════════════════
   CALCULATOR SHELLS — Shared input + 3 result shells
   ════════════════════════════════════════════════ */
.ctd-shell{
  max-width:780px;
  background:rgba(1,24,39,.75);
  border:1px solid rgba(133,255,199,.12);
  padding:clamp(2rem,4vw,3rem);
  position:relative;overflow:hidden
}
.ctd-shell::before{
  content:'';position:absolute;top:0;left:0;right:0;height:3px;
  background:linear-gradient(90deg,transparent,var(--aq),transparent);
  opacity:.5
}
.ctd-shell::after{
  content:'';position:absolute;bottom:0;right:0;
  width:180px;height:180px;
  background:radial-gradient(circle,rgba(133,255,199,.04) 0%,transparent 70%);
  pointer-events:none
}

/* Shell header */
.ctd-header{
  display:flex;align-items:center;gap:1rem;
  margin-bottom:2rem;padding-bottom:1.2rem;
  border-bottom:1px solid rgba(133,255,199,.06)
}
.ctd-header-icon{
  width:48px;height:48px;
  display:grid;place-items:center;
  background:rgba(133,255,199,.08);
  border:1px solid rgba(133,255,199,.15);
  flex-shrink:0
}
.ctd-header-icon i{font-size:1.3rem;color:var(--aq)}
.ctd-header-text h3{
  font-family:var(--h);font-weight:900;
  font-size:1.1rem;text-transform:uppercase;
  letter-spacing:.04em;line-height:1.2
}
.ctd-header-text span{
  font-size:1rem;color:rgba(255,255,255,.45);
  margin-top:.15rem;display:block
}

/* Product image inside calculator shell */
.ctd-products{
  display:flex;align-items:center;justify-content:flex-start;
  gap:clamp(1.5rem,3vw,2.5rem);
  margin-bottom:2rem;
  padding:1.5rem;
  background:rgba(0,100,102,.06);
  border:1px solid rgba(133,255,199,.06)
}
.ctd-product-card{
  display:flex;flex-direction:column;align-items:center;gap:.6rem;
  text-align:center
}
.ctd-product-card img{
  width:120px;height:120px;
  object-fit:contain;
  filter:drop-shadow(0 6px 16px rgba(0,0,0,.3));
  transition:transform .4s cubic-bezier(.16,1,.3,1)
}
.ctd-product-card:hover img{transform:scale(1.05)}
.ctd-product-card span{
  font-family:var(--h);font-weight:700;
  font-size:.72rem;letter-spacing:.1em;
  text-transform:uppercase;
  color:rgba(255,255,255,.5)
}

/* Input form layout */
.ctd-form{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:1.5rem;
  margin-bottom:2rem
}

/* Field styling */
.ctd-field label{
  display:block;
  font-family:var(--h);font-weight:700;
  font-size:.72rem;letter-spacing:.14em;
  text-transform:uppercase;
  color:rgba(255,255,255,.85);
  margin-bottom:.5rem
}
.ctd-field input{
  width:100%;padding:.9rem 1rem;
  background:rgba(1,24,39,.8);
  border:1px solid rgba(133,255,199,.12);
  color:var(--w);font-family:var(--h);
  font-size:1.2rem;font-weight:700;
  letter-spacing:.02em;
  transition:border-color .3s,box-shadow .3s;
  -moz-appearance:textfield
}
.ctd-field input::-webkit-outer-spin-button,
.ctd-field input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.ctd-field input::placeholder{color:rgba(255,255,255,.45)}
.ctd-field input:focus{
  outline:none;
  border-color:var(--aq);
  box-shadow:0 0 20px rgba(133,255,199,.08)
}
.ctd-field input.invalid{
  border-color:#ff5555;
  box-shadow:0 0 12px rgba(255,85,85,.12)
}
.ctd-field .ctd-hint{
  font-size:1rem;color:rgba(255,255,255,.6);
  margin-top:.4rem;line-height:1.4
}

/* Result display */
.ctd-result{
  display:flex;align-items:center;
  gap:1.5rem;
  padding:1.5rem 1.8rem;
  background:rgba(0,100,102,.12);
  border:1px solid rgba(133,255,199,.18);
  position:relative
}
.ctd-result::before{
  content:'';position:absolute;left:0;top:0;bottom:0;
  width:3px;background:var(--aq)
}
.ctd-result-label{
  font-family:var(--h);font-weight:700;
  font-size:.72rem;letter-spacing:.14em;
  text-transform:uppercase;
  color:rgba(255,255,255,.85);
  white-space:nowrap
}
.ctd-result-value{
  font-family:var(--h);font-weight:900;
  font-size:clamp(1.8rem,3vw,2.4rem);
  color:var(--aq);letter-spacing:-.01em;
  line-height:1
}
.ctd-result-unit{
  font-size:1rem;color:rgba(255,255,255,.7);
  font-weight:400;margin-left:.3rem
}

/* Max note / info note below result */
.ctd-max-note{
  display:flex;align-items:flex-start;gap:.8rem;
  margin-top:1.2rem;
  padding:.8rem 1.2rem;
  background:rgba(0,100,102,.06);
  border-left:2px solid rgba(133,255,199,.2)
}
.ctd-max-note i{
  flex-shrink:0;color:var(--aq);
  opacity:.6;margin-top:.15rem;font-size:.9rem
}
.ctd-max-note p{
  font-size:1rem;line-height:1.5;
  color:rgba(255,255,255,.6)
}

/* Hidden state — toggled by JS */
.ctd-hidden{display:none}

/* Warning note variant */
.ctd-warn-note{
  display:flex;align-items:flex-start;gap:.8rem;
  margin-top:1.2rem;
  padding:.8rem 1.2rem;
  background:rgba(255,85,85,.04);
  border-left:2px solid rgba(255,85,85,.35)
}
.ctd-warn-note i{
  flex-shrink:0;color:#ff5555;
  opacity:.7;margin-top:.15rem;font-size:.9rem
}
.ctd-warn-note p{
  font-size:1rem;line-height:1.5;
  color:rgba(255,255,255,.6)
}


/* ════════════════════════════════════════════════
   RESULT SHELLS — 3 product result sections
   ════════════════════════════════════════════════ */
.ctd-results-wrap{
  display:grid;gap:clamp(2rem,4vw,3rem);
  margin-top:clamp(2.5rem,5vw,3.5rem)
}

/* Disabled/pending state before inputs are filled */
.ctd-result-shell{
  transition:opacity .5s cubic-bezier(.16,1,.3,1)
}
.ctd-result-shell.pending{
  opacity:.3;pointer-events:none
}
.ctd-result-shell.pending .ctd-shell{
  filter:grayscale(.3)
}
.ctd-pending-msg{
  display:none;
  font-family:var(--h);font-weight:700;
  font-size:.82rem;letter-spacing:.08em;
  text-transform:uppercase;
  color:rgba(255,255,255,.35);
  padding:1rem 1.5rem;
  background:rgba(1,24,39,.4);
  border:1px dashed rgba(133,255,199,.1);
  text-align:center;
  margin-top:.8rem
}
.ctd-result-shell.pending .ctd-pending-msg{display:block}


/* ════════════════════════════════════════════════
   DOSING STEPS — Numbered procedure
   ════════════════════════════════════════════════ */
.ctd-steps{
  counter-reset:step;
  margin:1.5rem 0;
  display:grid;gap:.6rem
}
.ctd-step{
  counter-increment:step;
  display:flex;align-items:flex-start;gap:1rem;
  padding:.8rem 1rem;
  background:rgba(0,100,102,.04);
  border:1px solid rgba(133,255,199,.04);
  transition:border-color .3s
}
.ctd-step:hover{border-color:rgba(133,255,199,.12)}
.ctd-step::before{
  content:counter(step);
  flex-shrink:0;
  width:28px;height:28px;
  display:grid;place-items:center;
  font-family:var(--h);font-weight:900;
  font-size:.78rem;
  color:var(--bp);
  background:var(--aq);
  opacity:.8
}
.ctd-step p{
  font-size:1rem;line-height:1.6;
  color:rgba(255,255,255,.75);
  min-width:0
}
.ctd-step strong{color:var(--aq)}


/* ════════════════════════════════════════════════
   DOSING INSTRUCTION TEXT
   ════════════════════════════════════════════════ */
.ctd-dose-text{
  font-size:1.05rem;line-height:1.7;
  color:rgba(255,255,255,.82);
  margin:1.2rem 0
}
.ctd-dose-text strong{color:var(--aq)}

/* Section separator within a shell */
.ctd-separator{
  border:none;
  border-top:1px solid rgba(133,255,199,.08);
  margin:1.5rem 0
}


/* ════════════════════════════════════════════════
   N-DOC LINK — Call to action for testing
   ════════════════════════════════════════════════ */
.ctd-ndoc-link{
  display:flex;align-items:center;gap:1rem;
  padding:1rem 1.5rem;
  background:rgba(0,100,102,.1);
  border:1px solid rgba(133,255,199,.12);
  margin-top:1rem;
  transition:all .3s
}
.ctd-ndoc-link:hover{
  border-color:rgba(133,255,199,.3);
  background:rgba(0,100,102,.18)
}
.ctd-ndoc-link i{
  flex-shrink:0;color:var(--aq);
  font-size:1.2rem
}
.ctd-ndoc-link p{
  font-size:1rem;line-height:1.5;
  color:rgba(255,255,255,.7)
}
.ctd-ndoc-link a{
  color:var(--aq);font-weight:700;
  border-bottom:1px solid rgba(133,255,199,.3);
  transition:border-color .3s
}
.ctd-ndoc-link a:hover{border-color:var(--aq)}


/* ════════════════════════════════════════════════
   EXPERT QUOTE — Below calculator
   ════════════════════════════════════════════════ */
.ctd-quote{margin-top:clamp(2.5rem,5vw,3.5rem);max-width:780px}


/* ════════════════════════════════════════════════
   ABOUT SECTION — Product context grid
   ════════════════════════════════════════════════ */
.ctd-about-grid{
  display:grid;
  grid-template-columns:1fr 280px;
  gap:clamp(3rem,6vw,5rem);
  align-items:start
}
.ctd-about-products{
  display:grid;gap:1.5rem;
  position:sticky;top:8rem
}
.ctd-about-product-item{
  text-align:center
}
.ctd-about-product-item img{
  width:100%;max-width:180px;height:auto;margin:0 auto;
  filter:drop-shadow(0 12px 30px rgba(0,0,0,.4));
  transition:transform .6s cubic-bezier(.16,1,.3,1)
}
.ctd-about-product-item:hover img{transform:translateY(-6px)}
.ctd-about-product-item span{
  display:block;
  font-family:var(--h);font-weight:700;
  font-size:.78rem;letter-spacing:.1em;
  text-transform:uppercase;
  color:rgba(255,255,255,.45);
  margin-top:.6rem
}

.ctd-about-facts{
  display:grid;gap:1rem;
  margin-top:2rem
}
.ctd-fact{
  display:flex;align-items:flex-start;gap:1rem;
  padding:1rem 1.4rem;
  background:rgba(0,100,102,.08);
  border-left:3px solid rgba(133,255,199,.25)
}
.ctd-fact i{
  flex-shrink:0;font-size:1.1rem;
  color:var(--aq);margin-top:.15rem
}
.ctd-fact p{
  font-size:1rem;line-height:1.6;
  color:rgba(255,255,255,.75)
}
.ctd-fact strong{color:var(--w)}


/* ════════════════════════════════════════════════
   TIPS SECTION — Practical guidance
   ════════════════════════════════════════════════ */
.ctd-tips-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:2rem
}
.ctd-tip-icon{color:var(--aq);margin-right:.5rem}
.ctd-tip-p{margin-top:.8rem}
.ctd-tip-list{margin-top:.8rem}


/* ════════════════════════════════════════════════
   CTA — Final conversion section
   ════════════════════════════════════════════════ */
.ctd-cta{
  background:linear-gradient(180deg,var(--bp) 0%,rgba(0,100,102,.25) 50%,var(--bp) 100%);
  text-align:center;
  position:relative
}
.ctd-cta::before{
  content:'';position:absolute;inset:0;pointer-events:none;opacity:.03;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97'%3E%3Cpath d='M28 1l27 15.5v31L28 63 1 47.5v-31z' fill='none' stroke='%2385FFC7' stroke-width='.4'/%3E%3C/svg%3E");
  background-size:56px 97px
}
.ctd-cta .section-h{margin-bottom:1rem}
.ctd-cta .s-sub{margin-bottom:clamp(2rem,4vw,3rem)}
.ctd-cta-btns{
  display:flex;gap:1.2rem;
  justify-content:center;flex-wrap:wrap
}
.ctd-cta-sub{max-width:50ch;margin-left:auto;margin-right:auto}


/* ════════════════════════════════════════════════
   RESPONSIVE — Tablet (<=1024px)
   ════════════════════════════════════════════════ */
@media(max-width:1024px){
  .hero-tool .hero-ct{grid-template-columns:1fr}
  .hero-tool-product{justify-self:start;order:-1;margin-bottom:1.5rem}
  .hero-tool-product img{max-height:none;width:min(50vw,240px);height:auto}

  .ctd-form{grid-template-columns:1fr 1fr}

  .ctd-about-grid{grid-template-columns:1fr}
  .ctd-about-products{
    grid-template-columns:repeat(3,1fr);
    position:static;
    max-width:500px;
    margin:0 auto
  }

  .ctd-tips-grid{grid-template-columns:1fr 1fr}
}

/* ════════════════════════════════════════════════
   RESPONSIVE — Mobile (<=768px)
   ════════════════════════════════════════════════ */
@media(max-width:768px){
  .hero-tool{min-height:auto;padding-top:clamp(6rem,10vw,8rem)}
  .hero-tool .hero-ct{padding-bottom:clamp(3rem,5vw,4rem)}
  .hero-tool-product img{width:min(50vw,220px)}

  .ctd-form{grid-template-columns:1fr}

  .ctd-products{gap:1rem;padding:1rem}
  .ctd-product-card img{width:90px;height:90px}

  .ctd-result{flex-direction:column;align-items:flex-start;gap:.8rem}

  .ctd-step{gap:.8rem;padding:.7rem .8rem}
  .ctd-step::before{width:24px;height:24px;font-size:.72rem}

  .ctd-about-grid{gap:2rem}
  .ctd-about-products{grid-template-columns:repeat(3,1fr);gap:1rem}
  .ctd-about-facts{gap:.8rem}

  .ctd-tips-grid{grid-template-columns:1fr}

  .ctd-cta-btns{flex-direction:column;align-items:center}
  .ctd-cta-btns .btn{width:100%}

  .ctd-ndoc-link{flex-direction:column;text-align:center;gap:.6rem}
}

/* ════════════════════════════════════════════════
   RESPONSIVE — Small mobile (<=480px)
   ════════════════════════════════════════════════ */
@media(max-width:480px){
  .ctd-shell{padding:1.5rem}
  .ctd-header{flex-direction:column;align-items:flex-start;gap:.8rem}
  .ctd-about-products{grid-template-columns:1fr 1fr 1fr;gap:.8rem}
  .ctd-about-product-item img{max-width:120px}
}
