/* ==========================================================================
   DermaScan public website — app look
   --------------------------------------------------------------------------
   Loaded after site.css by layouts/public.blade.php and layouts/auth.blade.php.
   Mirrors the Flutter app: warm canvas, Fraunces display headings, Manrope UI
   text, deep-green gradient surfaces, soft 24px cards and pill controls.
   ========================================================================== */

.web-ui {
  --bg: #F7F5F1;
  --surface: #FFFFFF;
  --surface-2: #F0ECE5;
  --linen: #F4EEE4;
  --ink: #16211E;
  --ink-2: #55605C;
  --ink-3: #858E8A;
  --line: #E8E3DA;
  --line-2: #D9D2C6;
  --brand-soft: #E3EEEA;
  --brand-tint: #F1F6F4;
  --deep: #163A34;
  --copper: #B27A4B;
  --copper-soft: #F7ECE1;
  --grad: linear-gradient(135deg, #2B6658 0%, var(--brand) 52%, var(--deep) 100%);
  --font-display: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-serif: "Fraunces", Georgia, serif;
  --font-body: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --shadow-sm: 0 1px 2px rgba(22, 33, 30, .04), 0 6px 18px -10px rgba(22, 58, 52, .18);
  --shadow-md: 0 18px 40px -22px rgba(22, 58, 52, .35);
  --shadow-lg: 0 30px 60px -30px rgba(22, 58, 52, .45);
  background: var(--bg);
  font-family: var(--font-body);
  font-weight: 500;
}

/* ---- Type ---------------------------------------------------------------- */
.web-ui h1, .web-ui h2 { font-family: var(--font-serif); font-weight: 500; letter-spacing: -0.025em; }
.web-ui .brand-name { font-family: var(--font-body); font-weight: 800; }
.web-ui h3, .web-ui h4, .web-ui h5 { font-family: var(--font-body); font-weight: 800; letter-spacing: -0.015em; }
.web-ui .lead { color: var(--ink-2); }
.web-ui .eyebrow { width: fit-content; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--copper-soft); color: var(--copper); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.web-ui .eyebrow::before { width: 6px; height: 6px; border-radius: 50%; }
.web-ui .eyebrow.plain { background: none; padding: 0; }
.web-ui .section-head h2 { font-size: clamp(2rem, 1.4rem + 2.2vw, 3.1rem); line-height: 1.08; }

/* ---- Controls ------------------------------------------------------------ */
.web-ui .btn { border-radius: 16px; font-weight: 800; letter-spacing: -0.005em; }
.web-ui .btn-sm { border-radius: 12px; }
.web-ui .btn-lg { border-radius: 18px; min-height: 56px; }
.web-ui .btn-primary { --btn-bd: transparent; background: var(--grad); box-shadow: 0 12px 24px -14px rgba(22, 58, 52, .7); }
.web-ui .btn-primary:hover { filter: brightness(1.07); transform: translateY(-1px); }
.web-ui .btn-light { box-shadow: 0 12px 24px -14px rgba(0, 0, 0, .35); }
.web-ui .card { border-radius: var(--r-lg); border-color: var(--line); box-shadow: var(--shadow-sm); }
.web-ui .card-link:hover { box-shadow: var(--shadow-md); }
.web-ui .input, .web-ui .select, .web-ui .textarea { border-radius: 14px; border-color: var(--line); background: #fff; }
.web-ui .alert { border-radius: 16px; }
.web-ui .media { border-radius: 18px; }
.web-ui .icon-tile { border-radius: 14px; }

/* ---- Header -------------------------------------------------------------- */
.web-ui .site-header { background: transparent; border-bottom: 0; padding-top: 10px; height: auto; }
.web-ui .site-header > .container {
  height: 64px; max-width: calc(var(--container) + 24px); padding-inline: 14px 10px;
  background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid rgba(232, 227, 218, .9); border-radius: 22px; box-shadow: 0 10px 30px -22px rgba(22, 58, 52, .45);
}
.web-ui .site-header.is-scrolled { background: transparent; }
.web-ui .site-header.is-scrolled > .container { background: rgba(255, 255, 255, .94); box-shadow: 0 16px 34px -22px rgba(22, 58, 52, .55); }
.web-ui .nav a { border-radius: 12px; font-weight: 700; font-size: .9rem; color: var(--ink-2); }
.web-ui .nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.web-ui .brand-mark { background: var(--grad); border-radius: 12px; }
.web-ui .auth-aside .brand-mark, .web-ui .site-footer .brand-mark { background: #fff; }
.web-ui .menu-toggle { border-radius: 12px; background: var(--surface-2); }
@media (max-width: 1023px) {
  .web-ui .site-header { padding-inline: 10px; }
  .web-ui .site-header > .container { height: 58px; border-radius: 18px; }
}
.web-ui .mobile-menu { background: var(--bg); padding-top: 90px; }
.web-ui .mobile-menu a.m-link { font-family: var(--font-serif); font-weight: 500; font-size: 1.45rem; }
.web-ui .announce { background: var(--deep); }

/* ---- Hero ---------------------------------------------------------------- */
.web-ui .hero2::before { background: radial-gradient(60% 60% at 15% 10%, rgba(143, 227, 190, .18), transparent 60%), radial-gradient(50% 50% at 90% 0%, rgba(178, 122, 75, .12), transparent 60%); }
.web-ui .hero2 h1 { font-family: var(--font-serif); font-weight: 500; font-size: clamp(2.6rem, 1.6rem + 3.4vw, 4.6rem); line-height: 1.02; letter-spacing: -0.035em; }
.web-ui .hero2 h1 .hl { font-style: italic; }
.web-ui .hero-pill { border-radius: 999px; background: #fff; border-color: var(--line); box-shadow: var(--shadow-sm); font-weight: 800; }
.web-ui .hero2 .hero-meta { border-top: 0; padding-top: 0; }
.web-ui .hero2 .hero-meta span { padding: 7px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 700; color: var(--ink-2); }
.web-ui .float-card { border-radius: 16px; box-shadow: var(--shadow-md); }

/* Trust strip → floating stat cards */
.web-ui .trust-strip { background: transparent; border: 0; margin-top: -24px; position: relative; z-index: 2; }
.web-ui .trust-strip .container { gap: 12px; padding-inline: var(--gutter) !important; }
.web-ui .trust-item { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-sm); padding: 18px; }
.web-ui .trust-item + .trust-item { border-left: 1px solid var(--line); }
.web-ui .trust-item strong { font-family: var(--font-body); font-weight: 800; }
.web-ui .trust-item .icon-tile { background: var(--brand-soft); color: var(--brand); }

/* ---- Sections ------------------------------------------------------------ */
.web-ui .section-linen { background: linear-gradient(180deg, var(--linen), var(--bg)); }
.web-ui .section-surface { background: #fff; border: 0; }
.web-ui .process-section { background: var(--grad); }
.web-ui .process-section h2 { font-family: var(--font-serif); font-weight: 500; }
.web-ui .process-section .eyebrow { background: rgba(255, 255, 255, .12); color: #F3D9BC; }
.web-ui .page-hero { background: radial-gradient(70% 90% at 10% 0%, rgba(143, 227, 190, .16), transparent 60%), linear-gradient(180deg, var(--linen), var(--bg)); border-bottom: 0; }
.web-ui .page-hero h1 { font-weight: 500; line-height: 1.05; }
.web-ui .coach-card { border-radius: 32px; box-shadow: var(--shadow-lg); }
.web-ui .quote-card { border-radius: 24px; }
.web-ui .quote-card blockquote { font-family: var(--font-serif); font-size: 1.12rem; }
.web-ui .product-card { border-radius: 24px; }
.web-ui .product-card h3 { font-family: var(--font-body); font-weight: 800; }

/* FAQ accordions as cards */
.web-ui main details { background: #fff; border: 1px solid var(--line) !important; border-radius: 18px; padding: 2px 18px; margin-bottom: 10px; transition: box-shadow var(--dur-2); }
.web-ui main details[open] { box-shadow: var(--shadow-sm); }
.web-ui main details summary { font-weight: 800; }

/* CTA band */
.web-ui .cta-band { background: var(--grad); border-radius: 32px; box-shadow: var(--shadow-lg); }
.web-ui .cta-band h2 { font-family: var(--font-serif); font-weight: 500; }

/* Footer */
.web-ui .site-footer { background: var(--deep); border-radius: 36px 36px 0 0; margin-top: 24px; }
.web-ui .site-footer h4 { font-family: var(--font-body); letter-spacing: .14em; }

/* ---- Mobile sticky CTA (like the app's primary button) ---------------------- */
.web-cta-bar { display: none; }
@media (max-width: 767px) {
  .web-cta-bar {
    display: flex; gap: 8px; position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 45;
    padding: 8px; border-radius: 20px; background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border: 1px solid var(--line); box-shadow: 0 18px 40px -18px rgba(22, 58, 52, .5);
    transform: translateY(140%); transition: transform .35s var(--ease);
  }
  .web-cta-bar.is-on { transform: none; }
  .web-cta-bar .btn { flex: 1; min-height: 48px; }
  .web-cta-bar .btn.sec { flex: 0 0 auto; padding: 0 16px; background: var(--surface-2); border-color: transparent; }
  body.web-ui.has-cta-bar .site-footer { padding-bottom: 90px; }
}

/* ---- Responsive refinements -------------------------------------------------- */
@media (max-width: 900px) {
  .web-ui .trust-strip .container { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .web-ui .trust-item { flex-direction: column; align-items: flex-start; padding: 14px; }
  .web-ui .trust-item + .trust-item { border-left: 1px solid var(--line); }
  .web-ui .trust-item:last-child:nth-child(odd) { grid-column: 1 / -1; flex-direction: row; align-items: center; }
}
@media (max-width: 640px) {
  .web-ui .section { padding-block: clamp(48px, 12vw, 64px); }
  .web-ui .hero2 .hero-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .web-ui .hero2 .hero-actions .btn { width: 100%; }
  .web-ui .hero2 .hero-meta { gap: 8px; }
  .web-ui .grid-4:has(.product-card) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .web-ui .product-card { padding: 10px !important; gap: 10px; }
  .web-ui .product-card h3 { font-size: .92rem; }
  .web-ui .cta-band { border-radius: 26px; }
  .web-ui .cta-band .cluster { display: grid; grid-template-columns: 1fr; }
  .web-ui .cta-band .cluster .btn { width: 100%; }
  .web-ui .site-footer { border-radius: 26px 26px 0 0; }
  .web-ui .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .web-ui .footer-grid > div:first-child { grid-column: 1 / -1; }
}

/* ---- Auth pages -------------------------------------------------------------- */
.web-ui .auth-aside, .web-ui .auth-side { background: var(--grad); }
.web-ui .auth-card, .web-ui .auth-panel .card { border-radius: 28px; }

/* ---- Stories carousel (app style) ------------------------------------------ */
.web-ui .stories-section { background: radial-gradient(60% 70% at 100% 0%, rgba(178, 122, 75, .10), transparent 60%), linear-gradient(180deg, #fff 0%, var(--linen) 100%); border: 0; }
.web-ui .stories-section::before { opacity: .5; }
.web-ui .stories-head { align-items: flex-end; }
.web-ui .stories-head h2 { font-family: var(--font-serif); font-weight: 500; }
.web-ui .stories-score { display: flex; align-items: center; gap: 14px; padding: 12px 18px 12px 12px; border-radius: 22px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.web-ui .stories-score .score-num { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: var(--grad); color: #fff; font-family: var(--font-serif); font-size: 1.7rem; letter-spacing: -.02em; }
.web-ui .stories-score > div { display: grid; gap: 3px; }
.web-ui .stories-score > div > span:not(.stars) { font-size: .8rem; font-weight: 700; color: var(--ink-3); }

.web-ui .stories-viewport { padding-block: 10px 18px; }
.web-ui .story-card { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px; height: 100%; padding: 24px; border-radius: 26px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease); }
.web-ui .story-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.web-ui .story-card .story-quote { position: absolute; right: 18px; top: 16px; width: 56px; height: 42px; color: var(--copper); opacity: .14; }
.web-ui .story-person { display: flex; align-items: center; gap: 12px; padding-right: 54px; }
.web-ui .story-person .avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; display: grid; place-items: center; flex: none; object-fit: cover; box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--brand-soft); }
.web-ui .story-who strong { font-size: .98rem; font-weight: 800; }
.web-ui .story-who span { font-size: .78rem; color: var(--ink-3); font-weight: 600; }
.web-ui .story-card blockquote { margin: 0; flex: 1; font-family: var(--font-serif); font-weight: 500; font-size: clamp(1.08rem, 1rem + .35vw, 1.25rem); line-height: 1.5; letter-spacing: -.01em; color: var(--ink); }
.web-ui .story-card.has-photos blockquote { font-size: 1.02rem; }
.web-ui .story-card footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 14px; border-top: 1px dashed var(--line); }
.web-ui .story-verified { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 800; color: #2E7552; }
.web-ui .story-verified .icon { width: 16px; height: 16px; }
.web-ui .story-badge { font-size: .72rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--copper-soft); color: var(--copper); }
.web-ui .story-photos { margin: -10px -10px 0; }
.web-ui .story-photos figure { border-radius: 18px; }

.stories-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 10px; }
.stories-dots { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stories-dot { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px; background: var(--line-2); cursor: pointer; transition: width .35s var(--ease), background .3s var(--ease); }
.stories-dot:hover { background: var(--ink-3); }
.stories-dot.is-active { width: 28px; background: var(--brand); }
.stories-dot:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.stories-controls { display: flex; gap: 8px; }
.stories-arrow { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; transition: transform var(--dur-1), box-shadow var(--dur-1); }
.stories-arrow:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.stories-arrow.is-primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 12px 24px -14px rgba(22, 58, 52, .7); }
.stories-arrow .icon { width: 20px; height: 20px; }
@media (max-width: 640px) {
  .web-ui .stories-head { gap: 16px; }
  .web-ui .stories-score { width: 100%; }
  .web-ui .story-card { padding: 20px; border-radius: 22px; }
  .stories-arrow { width: 44px; height: 44px; border-radius: 14px; }
}
