/* =========================================================================
   YOSHIRO — Campaign landing pages
   Shared design system (the "skin" core). Every brand decision is a token
   here, so re-theming a page — or a whole future client — is a token change.

   Brand idea: "advanced performance marketing" = measurement + rigor.
   Signature: a fine measurement-rule motif (hairlines + mono tick labels).
   ========================================================================= */

/* ---- Tokens ------------------------------------------------------------- */
:root {
    /* Core brand — shared across all three campaigns */
    --ink:        #14161A;   /* near-black, slightly cool */
    --ink-soft:   #2A2D34;
    --paper:      #F5F4F1;   /* cool off-white (deliberately not warm cream) */
    --paper-pure: #FFFFFF;
    --muted:      #6B6E76;   /* secondary text */
    --line:       #E2E1DC;   /* hairlines / rules */
    --line-strong:#C9C8C1;

    /* Accent is overridden per campaign theme below. Teal is the default. */
    --accent:      #1C8C84;
    --accent-ink:  #0F4F4A;  /* darker accent for text on paper */
    --accent-contrast: #FFFFFF; /* text that sits on the accent */

    /* Type */
    --font-display: "Fraunces", Georgia, "Times New Roman", serif;
    --font-body:    "IBM Plex Sans", system-ui, -apple-system, sans-serif;
    --font-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

    /* Scale */
    --step-eyebrow: 0.78rem;
    --step-body:    1.0625rem;
    --step-lead:    1.3rem;
    --step-h3:      1.5rem;
    --step-h2:      clamp(1.9rem, 1.2rem + 2.6vw, 3rem);
    --step-hero:    clamp(2.6rem, 1.4rem + 5vw, 5.5rem);

    /* Space */
    --gutter: clamp(1.25rem, 5vw, 5rem);
    --section-y: clamp(3.5rem, 7vw, 7rem);
    --maxw: 1180px;

    --radius: 2px; /* near-square; precision, not playful */
}

/* ---- Reset-ish ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: var(--step-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }

/* ---- Layout helpers ----------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--tint { background: var(--paper-pure); }

/* The measurement-rule: a hairline with mono tick labels. The signature. */
.rule {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}
.rule::before { content: ""; height: 1px; width: 2.5rem; background: var(--ink); flex: none; }
.rule::after  { content: ""; height: 1px; flex: 1; background:
    repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px 9px); }

.eyebrow {
    font-family: var(--font-mono);
    font-size: var(--step-eyebrow);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-ink);
    margin: 0 0 1rem;
}

/* ---- Type --------------------------------------------------------------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.04; letter-spacing: -0.015em; }
h2 { font-size: var(--step-h2); margin: 0 0 1.5rem; }
h3 { font-size: var(--step-h3); margin: 0 0 0.6rem; font-weight: 500; }
p { margin: 0 0 1.1rem; max-width: 64ch; }
.lead { font-size: var(--step-lead); line-height: 1.5; color: var(--ink-soft); }
strong { font-weight: 600; }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
    --_bg: var(--ink);
    --_fg: var(--paper);
    display: inline-flex;
    align-items: center;
    gap: 0.6em;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.95em 1.6em;
    background: var(--_bg);
    color: var(--_fg);
    border: 1px solid var(--_bg);
    border-radius: var(--radius);
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.btn--accent { --_bg: var(--accent); --_fg: var(--accent-contrast); border-color: var(--accent); }
.btn--ghost  { --_bg: transparent; --_fg: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn .arrow { transition: transform .18s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---- Hero --------------------------------------------------------------- */
.hero {
    position: relative;
    min-height: min(88vh, 760px);
    display: flex;
    align-items: flex-end;
    color: var(--paper);
    overflow: hidden;
    /* Intentional fallback when no hero photo is supplied: ink base + a faint
       accent-tinted radial glow + the brand's measurement-rule motif as fine
       hatching. Reads as a deliberate dark panel, not an empty slot. The
       moment a real photo is dropped at --hero-img, .hero__media covers it. */
    background:
        radial-gradient(ellipse 70% 60% at 78% 22%,
            color-mix(in srgb, var(--accent) 22%, transparent) 0%,
            transparent 60%),
        radial-gradient(ellipse 60% 50% at 12% 88%,
            color-mix(in srgb, var(--accent) 10%, transparent) 0%,
            transparent 55%),
        repeating-linear-gradient(135deg,
            rgba(255, 255, 255, 0.022) 0 1px,
            transparent 1px 14px),
        var(--ink);
}
/* Image slot: set --hero-img per page. "No AI" — real photography goes here. */
.hero__media {
    position: absolute; inset: 0;
    background-image: var(--hero-img, none);
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
    animation: heroIn 1.4s ease forwards;
}
@keyframes heroIn { to { transform: scale(1); } }
.hero::after { /* legibility scrim */
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(20,22,26,.15) 0%, rgba(20,22,26,.35) 45%, rgba(20,22,26,.82) 100%);
}
.hero__inner { position: relative; z-index: 1; padding-block: clamp(2.5rem, 6vw, 5rem); }
.hero__eyebrow {
    font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--paper); opacity: .85; margin: 0 0 1.2rem;
    display: flex; align-items: center; gap: .8rem;
}
.hero__eyebrow::before { content: ""; width: 2rem; height: 1px; background: var(--accent); }
.hero h1 {
    font-size: var(--step-hero);
    margin: 0 0 1.6rem;
    max-width: 16ch;
    text-wrap: balance;
}
.hero h1 .sub { display: block; font-style: italic; font-weight: 400; color: var(--paper); opacity: .92; }

/* ---- Two-column prose --------------------------------------------------- */
.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 1.5rem; } }

/* ---- Stats (count-up) --------------------------------------------------- */
.stats { display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 4vw, 3.5rem); margin-top: 2rem; }
.stat__num { font-family: var(--font-display); font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 600; line-height: 1; }
.stat__label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: .5rem; }

/* ---- Comparison table (Competitor page) --------------------------------- */
.compare { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin-top: 1.5rem; }
.compare th, .compare td { text-align: left; padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); }
.compare thead th {
    font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--muted); font-weight: 500; vertical-align: bottom;
}
.compare td.col-yes, .compare td.col-no { text-align: center; width: 8.5rem; font-weight: 600; }
.compare .col-no { color: var(--muted); }
.compare .col-yes { color: var(--accent-ink); }
/* Highlight the Yoshiro column */
.compare th.is-us, .compare td.is-us { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.compare th.is-us { color: var(--accent-ink); }
.compare tbody tr:hover td { background: color-mix(in srgb, var(--ink) 3%, transparent); }
.compare th.is-us { box-shadow: inset 0 -2px 0 var(--accent); }
@media (max-width: 720px) {
    .compare, .compare thead, .compare tbody, .compare th, .compare td, .compare tr { display: block; }
    .compare thead { position: absolute; left: -9999px; }
    .compare tr { border: 1px solid var(--line); margin-bottom: .75rem; padding: .5rem .75rem; background: var(--paper-pure); }
    .compare td { border: none; padding: .35rem 0; display: flex; justify-content: space-between; gap: 1rem; }
    .compare td.col-yes, .compare td.col-no { width: auto; text-align: right; }
    .compare td::before { content: attr(data-label); font-family: var(--font-mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
    .compare td.col-service::before { content: none; }
    .compare td.col-service { font-weight: 600; }
}

/* ---- Form --------------------------------------------------------------- */
.contact { background: var(--ink); color: var(--paper); }
.contact .eyebrow { color: color-mix(in srgb, var(--accent) 65%, white); }
.contact h2 { color: var(--paper); }
.contact .rule { color: rgba(245,244,241,.6); }
.contact .rule::before { background: var(--paper); }
.contact .rule::after { background: repeating-linear-gradient(90deg, rgba(245,244,241,.4) 0 1px, transparent 1px 9px); }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; margin-top: 2rem; max-width: 720px; }
.form .field--full { grid-column: 1 / -1; }
@media (max-width: 620px) { .form { grid-template-columns: 1fr; } }
.field label {
    display: block; font-family: var(--font-mono); font-size: 0.72rem;
    letter-spacing: 0.08em; text-transform: uppercase; color: rgba(245,244,241,.7); margin-bottom: .5rem;
}
.field input, .field textarea {
    width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--paper);
    background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.18);
    border-radius: var(--radius); padding: 0.85rem 0.9rem; transition: border-color .15s ease, background .15s ease;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field textarea:focus {
    outline: none; border-color: var(--accent); background: rgba(255,255,255,.08);
}
.field input::placeholder, .field textarea::placeholder { color: rgba(245,244,241,.4); }
.field--error input, .field--error textarea { border-color: #E5707E; }
.field__error { font-family: var(--font-mono); font-size: .7rem; color: #F0A6AE; margin-top: .4rem; min-height: 1em; }

/* Honeypot — visually and structurally hidden from humans, present for bots */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.form__actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.form__status { font-family: var(--font-mono); font-size: .8rem; }
.form__status.is-ok { color: color-mix(in srgb, var(--accent) 70%, white); }
.form__status.is-err { color: #F0A6AE; }
.form.is-sent .form__actions .btn { opacity: .5; pointer-events: none; }

/* ---- Testimonials ------------------------------------------------------- */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.quote { background: var(--paper-pure); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; }
.quote p { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.4; font-style: italic; }
.quote .cite { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* ---- Footer ------------------------------------------------------------- */
.foot { background: var(--ink); color: var(--paper); padding-block: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid rgba(255,255,255,.1); }
.foot__top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem; align-items: center; }
.foot__brand { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; }
.socials { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; font-family: var(--font-mono); font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; }
.socials a { color: rgba(245,244,241,.7); text-decoration: none; transition: color .15s ease; }
.socials a:hover { color: var(--accent); }
.foot__meta { font-family: var(--font-mono); font-size: .72rem; color: rgba(245,244,241,.45); margin-top: 2rem; letter-spacing: .04em; }

/* ---- Scroll reveal ------------------------------------------------------ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* =========================================================================
   CAMPAIGN THEMES — the only per-page brand difference is the accent.
   Set one class on <body>. This is the knob a future client/engine turns.
   ========================================================================= */
body.theme-clinic     { --accent: #1C8C84; --accent-ink: #0F4F4A; --accent-contrast: #FFFFFF; } /* clinical teal */
body.theme-luxury     { --accent: #B0894F; --accent-ink: #6E5326; --accent-contrast: #14161A; } /* gilded brass */
body.theme-competitor { --accent: #C8334A; --accent-ink: #8E1F31; --accent-contrast: #FFFFFF; } /* assertive carmine */
