/* =====================================================================
   DSQUARE APPS — shared design system
   Used by index.html, pam.html, portact.html
   ===================================================================== */

:root{
    /* Matte charcoal canvas — sampled from the logo's matte background */
    --bg:#0c0c0e;
    --bg-2:#161719;
    --surface:#17181b;
    --surface-2:rgba(255,255,255,.035);
    --surface-hover:#1f2023;
    --border:rgba(255,255,255,.08);
    --border-strong:rgba(255,255,255,.14);
    --text:#ffffff;
    --muted:#9ca3af;
    --silver:#c7ccd3;

    /* Brushed-metal palette — sampled from the logo mark (white highlight → steel) */
    --metal-hi:#f4f5f7;
    --metal-1:#d3d6db;
    --metal-2:#9aa0a8;
    --metal-3:#76757a;
    --metal-ink:#14151a;
    --metal-grad:linear-gradient(180deg,#f4f5f7 0%,#d3d6db 40%,#878c93 62%,#eceef1 100%);
    --btn-metal:linear-gradient(135deg,#edeff2 0%,#c4c8cf 30%,#888d95 55%,#cfd2d8 78%,#9ea3ab 100%);

    /* Brand-canvas accent defaults to metallic silver; app pages override these */
    --accent:#c8ccd3;
    --accent-2:#a6abb4;
    --accent-ink:var(--metal-ink);          /* text color on accent fills */
    --accent-glow:rgba(201,206,214,.16);
    --btn-fill:var(--btn-metal);             /* app pages override to a colored gradient */

    --radius:24px;
    --radius-sm:14px;
    --maxw:1200px;
}

/* Brushed-metal text treatment for the DSQUARE wordmarks */
.metal-text,
.logo-text,
.footer-title,
.hero h1{
    background:var(--metal-grad);
    -webkit-background-clip:text;
    background-clip:text;
    color:transparent;
    -webkit-text-fill-color:transparent;
}

*{ margin:0; padding:0; box-sizing:border-box; }

html{ scroll-behavior:smooth; }

body{
    font-family:'Inter',system-ui,sans-serif;
    /* Matte studio light: soft neutral glow from the top fading to near-black —
       mirrors the logo's top-lit matte background (no color cast). */
    background:
        radial-gradient(130% 90% at 50% -15%, #303135 0%, rgba(48,49,53,0) 58%),
        radial-gradient(80% 50% at 50% 120%, #050506 0%, rgba(5,5,6,0) 60%),
        linear-gradient(180deg, #161719 0%, #0c0c0e 52%, #08080a 100%);
    background-attachment:fixed;
    color:var(--text);
    min-height:100vh;
    font-size:1.0625rem;
    line-height:1.55;
    -webkit-font-smoothing:antialiased;
}

a{ color:inherit; }

.container{ width:min(var(--maxw),92%); margin:auto; }

.eyebrow{
    display:inline-block;
    font-family:'Space Grotesk',sans-serif;
    font-size:.78rem;
    letter-spacing:.22em;
    text-transform:uppercase;
    color:var(--accent-2);
    margin-bottom:18px;
}

/* ---------------- NAV ---------------- */
nav{
    position:sticky;
    top:0;
    backdrop-filter:blur(12px);
    background:rgba(12,12,14,.72);
    border-bottom:1px solid var(--border);
    z-index:100;
}
.nav-inner{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:16px 0;
}
.brand{
    display:flex;
    align-items:center;
    gap:12px;
    text-decoration:none;
}
.brand img{
    width:38px;
    height:38px;
    border-radius:10px;
    object-fit:cover;
    box-shadow:0 4px 16px rgba(0,0,0,.5);
}
.brand .logo-text{
    font-family:'Space Grotesk',sans-serif;
    font-weight:700;
    letter-spacing:.15em;
    font-size:1rem;
}
.nav-links{ display:flex; gap:32px; align-items:center; }
.nav-links a{
    color:var(--muted);
    text-decoration:none;
    font-size:.95rem;
    transition:.25s;
}
.nav-links a:hover{ color:#fff; }
.nav-links a.nav-cta{
    color:var(--accent-ink);
    padding:9px 18px;
    border-radius:10px;
    background:var(--btn-fill);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.4);
}
.nav-links a.nav-cta:hover{ transform:translateY(-1px); color:var(--accent-ink); }

/* ---------------- BUTTONS ---------------- */
.btn{
    display:inline-flex;
    align-items:center;
    gap:10px;
    padding:15px 28px;
    border-radius:var(--radius-sm);
    text-decoration:none;
    font-weight:600;
    color:var(--accent-ink);
    background:var(--btn-fill);
    transition:.25s;
    border:none;
    cursor:pointer;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.45), 0 6px 20px rgba(0,0,0,.4);
}
.btn:hover{ transform:translateY(-3px); box-shadow:inset 0 1px 0 rgba(255,255,255,.5), 0 14px 34px var(--accent-glow); }
.btn.ghost{
    background:transparent;
    border:1px solid var(--border-strong);
    color:var(--silver);
    box-shadow:none;
}
.btn.ghost:hover{ background:rgba(255,255,255,.04); box-shadow:none; }
.btn-row{ display:flex; gap:16px; flex-wrap:wrap; }

/* ---------------- HERO (landing) ---------------- */
.hero{ padding:96px 0 84px; text-align:center; }
.hero-logo{
    width:150px;
    height:150px;
    margin:0 auto 34px;
    border-radius:30px;
    object-fit:cover;
    box-shadow:0 24px 70px rgba(0,0,0,.55), inset 0 1px 1px rgba(255,255,255,.18);
    border:1px solid var(--border);
}
.hero h1{
    font-family:'Space Grotesk',sans-serif;
    font-size:clamp(2.6rem,5vw,4.6rem);
    letter-spacing:.08em;
    margin-bottom:18px;
    line-height:1.05;
}
.tagline{ color:var(--silver); font-size:1.5rem; margin-bottom:26px; }
.hero-text{
    max-width:680px;
    margin:0 auto;
    color:var(--muted);
    line-height:1.85;
    font-size:1.18rem;
}
.cta{ margin-top:42px; display:flex; gap:16px; justify-content:center; flex-wrap:wrap; }

/* ---------------- SECTION ---------------- */
section{ padding:84px 0; }
.section-head{ text-align:center; max-width:720px; margin:0 auto 54px; }
.section-title{
    font-size:clamp(1.9rem,3.4vw,2.4rem);
    font-family:'Space Grotesk',sans-serif;
    letter-spacing:.01em;
    margin-bottom:14px;
}
.section-subtitle{ color:var(--muted); font-size:1.18rem; line-height:1.7; }
.fine-print{
    max-width:760px; margin:32px auto 0; text-align:center;
    color:var(--muted); font-size:.86rem; line-height:1.6;
    opacity:.8;
}

/* ---------------- APP SHOWCASE (landing) ---------------- */
.apps-stack{ display:flex; flex-direction:column; gap:36px; }
.app-feature{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);
    gap:0;
    background:var(--surface-2);
    border:1px solid var(--border);
    border-radius:var(--radius);
    overflow:hidden;
    transition:.35s;
}
.app-feature:hover{ border-color:var(--border-strong); transform:translateY(-4px); }
.app-feature.reverse{ grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); }
.app-feature.reverse .af-media{ order:-1; }

.af-body{ padding:46px; }
.af-head{ display:flex; align-items:center; gap:16px; margin-bottom:20px; }
.af-logo{
    width:62px; height:62px; border-radius:16px; object-fit:cover;
    background:#fff; padding:6px;
    box-shadow:0 8px 24px rgba(0,0,0,.45);
}
.af-head h3{ font-family:'Space Grotesk',sans-serif; font-size:1.7rem; letter-spacing:.02em; }
.af-head .af-kicker{ display:block; color:var(--muted); font-size:.9rem; margin-top:3px; }
.af-pitch{ color:var(--silver); font-size:1.1rem; line-height:1.85; margin-bottom:22px; }
.af-tags{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:26px; }

.af-media{
    position:relative;
    min-height:340px;
    background:
        radial-gradient(circle at 32% 18%, rgba(255,255,255,.06), transparent 55%),
        linear-gradient(135deg,#181819,#0d0d0f);
    display:flex; align-items:center; justify-content:center;
    border-left:1px solid var(--border);
}
.app-feature.reverse .af-media{ border-left:none; border-right:1px solid var(--border); }

/* ---------------- PILLS / BADGES ---------------- */
.pill{
    display:inline-flex; align-items:center; gap:6px;
    padding:6px 13px;
    border-radius:999px;
    font-size:.82rem;
    color:var(--silver);
    background:rgba(255,255,255,.05);
    border:1px solid var(--border);
}
.pill.accent{
    color:var(--accent-2);
    border-color:color-mix(in srgb, var(--accent) 35%, transparent);
    background:color-mix(in srgb, var(--accent) 10%, transparent);
}

/* ---------------- CARD GRID ---------------- */
.grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:24px; }
.card{
    background:var(--surface-2);
    border:1px solid var(--border);
    border-radius:var(--radius);
    padding:30px;
    transition:.3s;
}
.card:hover{ transform:translateY(-6px); background:var(--surface-hover); border-color:var(--border-strong); }
.card .card-icon{
    width:46px; height:46px; border-radius:12px;
    display:flex; align-items:center; justify-content:center;
    font-size:1.4rem; margin-bottom:16px;
    background:linear-gradient(135deg,rgba(255,255,255,.11),rgba(255,255,255,.03));
    border:1px solid var(--border);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.10);
}
.card h3{ font-size:1.15rem; margin-bottom:10px; font-family:'Space Grotesk',sans-serif; }
.card p{ color:var(--muted); line-height:1.7; font-size:1.05rem; }
.card-button{
    margin-top:18px; display:inline-flex; align-items:center; gap:6px;
    color:var(--accent-2); text-decoration:none; font-weight:600; font-size:.95rem;
    transition:.2s;
}
.card-button:hover{ gap:11px; }
.card.soon{ opacity:.72; }

/* ---------------- DETAIL PAGE HERO ---------------- */
.app-hero{ padding:80px 0 40px; }
.app-hero-inner{
    display:grid;
    grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);
    gap:54px;
    align-items:center;
}
.app-hero-logo{
    width:96px; height:96px; border-radius:24px; object-fit:cover;
    background:#fff; padding:10px;
    box-shadow:0 16px 44px rgba(0,0,0,.5);
    margin-bottom:24px;
}
.app-hero-head{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:22px;
    margin-bottom:22px;
}
.app-hero-head .app-hero-logo{ margin-bottom:0; flex-shrink:0; }
.app-hero-titles .eyebrow{ display:block; margin-bottom:8px; }
.app-hero h1{
    font-family:'Space Grotesk',sans-serif;
    font-size:clamp(2.4rem,4.6vw,3.6rem);
    letter-spacing:.04em;
    margin-bottom:14px;
}
.app-hero-head h1{ margin-bottom:0; line-height:1; }
.app-hero .lead{ color:var(--silver); font-size:1.35rem; margin-bottom:18px; }
.app-hero p.desc{ color:var(--muted); font-size:1.1rem; line-height:1.85; margin-bottom:26px; max-width:560px; }
.meta-row{ display:flex; flex-wrap:wrap; gap:10px; margin-bottom:30px; }

/* ---------------- STATS STRIP ---------------- */
.stats{ display:flex; flex-wrap:wrap; gap:18px; }
.stat{
    flex:1; min-width:150px;
    background:var(--surface-2);
    border:1px solid var(--border);
    border-radius:var(--radius-sm);
    padding:22px;
    text-align:center;
}
.stat .num{
    font-family:'Space Grotesk',sans-serif;
    font-size:1.9rem; font-weight:700;
    background:linear-gradient(135deg,var(--accent),var(--accent-2));
    -webkit-background-clip:text; background-clip:text; color:transparent; -webkit-text-fill-color:transparent;
}
.stat .lbl{ color:var(--muted); font-size:.86rem; margin-top:6px; }

/* ---------------- HOW IT WORKS (steps) ---------------- */
.steps{ display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:24px; counter-reset:step; }
.step{
    background:var(--surface-2); border:1px solid var(--border);
    border-radius:var(--radius); padding:30px; position:relative;
}
.step::before{
    counter-increment:step; content:counter(step);
    font-family:'Space Grotesk',sans-serif; font-weight:700;
    width:40px; height:40px; border-radius:12px; display:flex; align-items:center; justify-content:center;
    background:linear-gradient(135deg,var(--accent),var(--accent-2)); color:var(--accent-ink);
    margin-bottom:16px;
}
.step h4{ font-size:1.1rem; margin-bottom:8px; font-family:'Space Grotesk',sans-serif; }
.step p{ color:var(--muted); line-height:1.7; font-size:1.04rem; }

/* ---------------- SCREENSHOT GALLERY + PLACEHOLDERS ---------------- */
.gallery{ display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:24px; }
/* Phone-screenshot gallery — portrait slots sized for mobile shots */
.gallery--phone .shot__frame{ aspect-ratio:9/19; max-width:280px; margin-inline:auto; }
.shot{ margin:0; }
.shot__frame{
    position:relative;
    aspect-ratio:16/10;
    border-radius:var(--radius-sm);
    overflow:hidden;
    border:1px solid var(--border);
    background:
        radial-gradient(circle at 30% 20%, rgba(255,255,255,.05), transparent 60%),
        linear-gradient(135deg,#161617,#0c0c0e);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.06);
}
.shot__frame.phone{ aspect-ratio:9/16; max-width:300px; margin-inline:auto; }
.shot__frame.phone-tall{ aspect-ratio:896/1756; max-width:300px; margin-inline:auto; }
.shot__frame.phone-tall img{ object-fit:contain; }
.shot__frame.portrait{ aspect-ratio:4/5; max-width:340px; margin-inline:auto; }
.shot__frame img{ width:100%; height:100%; object-fit:cover; display:block; }
.shot__frame.portrait img{ object-fit:contain; }

/* Wide app screenshots (PortAct hero, callouts & gallery) — show the whole
   screenshot, never crop. Frame ratios match the captures to minimise letterboxing. */
.callout .shot__frame:not(.phone-tall),
.gallery:not(.gallery--phone) .shot__frame{ aspect-ratio:19/10; }
.app-hero .shot__frame:not(.phone){ aspect-ratio:16/6; }
.app-hero .shot__frame:not(.phone) img,
.callout .shot__frame:not(.phone-tall) img,
.gallery:not(.gallery--phone) .shot__frame img{ object-fit:contain; }

/* ---------------- LIGHTBOX (click a screenshot to view full size) ---------------- */
.shot__frame img.is-zoomable{ cursor:zoom-in; }
.lightbox{
    position:fixed; inset:0; z-index:1000;
    display:flex; align-items:center; justify-content:center;
    padding:4vmin;
    background:rgba(6,6,8,.9);
    backdrop-filter:blur(6px);
    cursor:zoom-out;
    opacity:0; visibility:hidden;
    transition:opacity .2s ease, visibility .2s ease;
}
.lightbox.is-open{ opacity:1; visibility:visible; }
.lightbox__img{
    max-width:96vw; max-height:92vh; width:auto; height:auto;
    border-radius:10px;
    box-shadow:0 30px 90px rgba(0,0,0,.65);
    border:1px solid var(--border-strong);
    cursor:default;
}
.lightbox__close{
    position:absolute; top:18px; right:22px;
    width:44px; height:44px; border-radius:50%;
    border:1px solid var(--border-strong);
    background:rgba(255,255,255,.08); color:#fff;
    font-size:1.7rem; line-height:1; cursor:pointer;
    display:flex; align-items:center; justify-content:center;
    transition:.2s;
}
.lightbox__close:hover{ background:rgba(255,255,255,.18); transform:scale(1.06); }
.shot__ph{
    display:none;
    position:absolute; inset:0;
    flex-direction:column; align-items:center; justify-content:center;
    text-align:center; padding:24px; gap:10px;
}
.shot__frame.is-empty .shot__ph{ display:flex; }
.shot__ph .ico{
    width:54px; height:54px; border-radius:14px;
    display:flex; align-items:center; justify-content:center; font-size:1.5rem;
    background:rgba(255,255,255,.05); border:1px dashed var(--border-strong);
    color:var(--accent-2);
}
.shot__ph .ph-title{ font-weight:600; font-size:.98rem; color:var(--silver); }
.shot__ph .ph-sub{ font-size:.8rem; color:var(--muted); }
.shot figcaption{ margin-top:12px; color:var(--muted); font-size:.92rem; text-align:center; }

/* ---------------- FEATURE LIST (two-col) ---------------- */
.feature-list{ display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:14px 28px; list-style:none; }
.feature-list li{ position:relative; padding:6px 0 6px 30px; color:var(--silver); line-height:1.6; font-size:1.05rem; }
.feature-list li::before{
    content:""; position:absolute; left:0; top:13px;
    width:14px; height:14px; border-radius:5px;
    background:linear-gradient(135deg,var(--accent),var(--accent-2));
    box-shadow:0 0 0 4px var(--accent-glow);
}
.feature-list li b{ color:#fff; font-weight:600; }

/* ---------------- BANNER / CALLOUT ---------------- */
.callout{
    background:
        radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 55%),
        var(--surface-2);
    border:1px solid var(--border);
    border-radius:var(--radius);
    padding:46px;
    display:grid; grid-template-columns:1.4fr 1fr; gap:34px; align-items:center;
}
.callout h3{ font-family:'Space Grotesk',sans-serif; font-size:1.6rem; margin-bottom:12px; }
.callout p{ color:var(--muted); line-height:1.8; font-size:1.1rem; }

/* ---------------- PHILOSOPHY ---------------- */
.philosophy-title{
    font-family:'Space Grotesk',sans-serif;
    font-size:clamp(1.4rem,5.5vw,2.8rem);
    letter-spacing:.01em;
    line-height:1.1;
    margin-bottom:12px;
    white-space:nowrap;
}
.philosophy-grid{ margin-top:8px; }
.philosophy-grid .card{ display:flex; flex-direction:column; }
.philosophy-grid .card em{ color:var(--silver); font-style:italic; }

/* ---------------- FOOTER ---------------- */
footer{ border-top:1px solid var(--border); padding:56px 0 40px; }
.footer-grid{ display:flex; justify-content:space-between; flex-wrap:wrap; gap:30px; margin-bottom:34px; }
.footer-brand{ max-width:320px; }
.footer-brand .footer-title{
    font-family:'Space Grotesk',sans-serif; letter-spacing:.15em; margin-bottom:12px; font-size:1.1rem;
}
.footer-brand p{ color:var(--muted); line-height:1.7; font-size:1.02rem; }
.footer-col h5{ font-size:.8rem; letter-spacing:.14em; text-transform:uppercase; color:var(--muted); margin-bottom:16px; }
.footer-col a{ display:block; color:var(--silver); text-decoration:none; margin-bottom:10px; font-size:1rem; transition:.2s; }
.footer-col a:hover{ color:var(--accent-2); }
.copyright{ color:#6b7280; font-size:.88rem; text-align:center; border-top:1px solid var(--border); padding-top:26px; }

/* ---------------- MOBILE ---------------- */
@media(max-width:880px){
    .app-feature,
    .app-feature.reverse{ grid-template-columns:1fr; }
    .app-feature.reverse .af-media{ order:0; border-right:none; }
    .af-media{ border-left:none; border-top:1px solid var(--border); min-height:260px; }
    .app-hero-inner{ grid-template-columns:1fr; gap:36px; }
    .callout{ grid-template-columns:1fr; padding:34px; }
}
@media(max-width:768px){
    .nav-links{ gap:18px; }
    .nav-links a:not(.nav-cta){ display:none; }
    .hero{ padding-top:70px; }
    .hero-logo{ width:120px; height:120px; }
    .af-body{ padding:32px; }
}
