/* ===== The App Shed — brand site ===== */

/* --- Tokens --- */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.82rem + 0.25vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2.1rem, 1.4rem + 2.6vw, 3.5rem);

  --space-1:.25rem; --space-2:.5rem; --space-3:.75rem; --space-4:1rem;
  --space-5:1.25rem; --space-6:1.5rem; --space-8:2rem; --space-10:2.5rem;
  --space-12:3rem; --space-16:4rem; --space-20:5rem; --space-24:6rem; --space-32:8rem;

  --font-display:'DM Sans','Helvetica Neue',sans-serif;
  --font-body:'Inter','Helvetica Neue',sans-serif;

  /* App accent colors (exact brand) */
  --green:#357829;
  --red-app:#DC3832;
  --navy-app:#212250;
  --blue:#2966A8;
  --red:#DC3832;

  --radius-sm:.375rem; --radius-md:.625rem; --radius-lg:1rem; --radius-xl:1.4rem;
  --radius-full:9999px;
  --content:1140px;
  --ease:cubic-bezier(.16,1,.3,1);
  --transition-interactive:200ms var(--ease);
}

/* LIGHT (default) */
:root, [data-theme="light"] {
  --navy:#212250;
  --red-brand:#DC3832;
  --beige:#F8E9DA;
  --ltblue:#DAE8EF;

  --color-bg:#FBFAF7;
  --color-surface:#FFFFFF;
  --color-surface-2:#F5F1EA;
  --color-text:#1C1C2E;
  --color-text-muted:#5C5C6E;
  --color-text-faint:#9A96A0;
  --color-border:#E4DFD6;
  --color-divider:#EDE8DF;

  --hero-bg:#212250;
  --hero-text:#FFFFFF;
  --shadow-sm:0 1px 3px rgba(33,34,80,.07);
  --shadow-md:0 8px 24px rgba(33,34,80,.10);
  --shadow-lg:0 20px 48px rgba(33,34,80,.16);
}

/* DARK */
[data-theme="dark"] {
  --color-bg:#14152B;
  --color-surface:#1C1D3A;
  --color-surface-2:#232452;
  --color-text:#ECEAF2;
  --color-text-muted:#A6A4BC;
  --color-text-faint:#6E6C88;
  --color-border:#2E2F58;
  --color-divider:#272850;

  --beige:#F8E9DA;
  --ltblue:#9FBED2;
  --navy:#212250;

  --hero-bg:#0E0F22;
  --hero-text:#FFFFFF;
  --shadow-sm:0 1px 3px rgba(0,0,0,.4);
  --shadow-md:0 8px 24px rgba(0,0,0,.45);
  --shadow-lg:0 20px 48px rgba(0,0,0,.55);
  --green:#5BA94C;
  --blue:#5591C7;
}

/* --- Base --- */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;scroll-behavior:smooth;scroll-padding-top:5rem}
body{min-height:100dvh;line-height:1.6;font-family:var(--font-body);font-size:var(--text-base);color:var(--color-text);background:var(--color-bg);transition:background .4s var(--ease),color .4s var(--ease)}
img,svg{display:block;max-width:100%;height:auto}
ul[role=list]{list-style:none}
a{color:inherit;text-decoration:none}
h1,h2,h3,h4{font-family:var(--font-display);text-wrap:balance;line-height:1.12;letter-spacing:-.015em}
p{text-wrap:pretty;max-width:62ch}
button{cursor:pointer;background:none;border:none;color:inherit;font:inherit}
::selection{background:rgba(220,56,50,.22)}
:focus-visible{outline:2px solid var(--red-brand);outline-offset:3px;border-radius:var(--radius-sm)}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media (prefers-reduced-motion:reduce){*{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}

.container{width:100%;max-width:var(--content);margin-inline:auto;padding-inline:clamp(1.25rem,4vw,2.5rem)}

.kicker{display:inline-block;font-family:var(--font-body);font-size:var(--text-xs);font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:var(--red-brand);margin-bottom:var(--space-4)}
.kicker--light{color:var(--beige)}

/* --- Buttons --- */
.btn{display:inline-flex;align-items:center;gap:.5rem;font-family:var(--font-body);font-weight:600;font-size:var(--text-sm);padding:.85rem 1.6rem;border-radius:var(--radius-full);transition:transform var(--transition-interactive),background var(--transition-interactive),box-shadow var(--transition-interactive),border-color var(--transition-interactive)}
.btn--primary{background:var(--red-brand);color:#fff;box-shadow:var(--shadow-sm)}
.btn--primary:hover{background:#c32f29;transform:translateY(-2px);box-shadow:var(--shadow-md)}
.btn--ghost{background:transparent;color:var(--hero-text);border:1.5px solid rgba(255,255,255,.4)}
.btn--ghost:hover{border-color:#fff;background:rgba(255,255,255,.08);transform:translateY(-2px)}

/* --- Header --- */
.header{position:sticky;top:0;z-index:50;background:color-mix(in srgb,var(--color-bg) 88%,transparent);backdrop-filter:blur(12px);border-bottom:1px solid var(--color-divider);transition:box-shadow .3s var(--ease),background .4s var(--ease)}
.header--scrolled{box-shadow:var(--shadow-sm)}
.header__inner{display:flex;align-items:center;justify-content:space-between;gap:var(--space-6);min-height:4.5rem}
.header__logo img{height:42px;width:auto}
.logo-dark{display:none}
[data-theme="dark"] .logo-light{display:none}
[data-theme="dark"] .logo-dark{display:block}
.nav{display:flex;align-items:center;gap:clamp(1rem,2.5vw,2rem);margin-left:auto}
.nav a{font-size:var(--text-sm);font-weight:500;color:var(--color-text-muted);transition:color var(--transition-interactive)}
.nav a:hover{color:var(--color-text)}
.nav__cta{color:var(--color-text)!important;font-weight:600;padding:.55rem 1.1rem;border:1.5px solid var(--navy);border-radius:var(--radius-full)}
[data-theme="dark"] .nav__cta{border-color:var(--color-border)}
.nav__cta:hover{background:var(--navy);color:#fff!important}
.theme-toggle{display:grid;place-items:center;width:40px;height:40px;border-radius:var(--radius-full);color:var(--color-text-muted);border:1px solid var(--color-border)}
.theme-toggle:hover{color:var(--color-text);background:var(--color-surface-2)}

/* --- Hero --- */
.hero{background:var(--hero-bg);color:var(--hero-text);position:relative;overflow:hidden;border-bottom:5px solid var(--red-brand)}
.hero__flag{position:absolute;top:50%;right:-2%;transform:translateY(-50%);width:min(46%,560px);height:auto;opacity:.13;pointer-events:none;z-index:0;-webkit-mask-image:linear-gradient(to left,#000 55%,transparent);mask-image:linear-gradient(to left,#000 55%,transparent)}
@media (max-width:760px){.hero__flag{width:min(80%,420px);opacity:.09;right:-8%}}
.hero::before{content:"";position:absolute;inset:0;background:
  radial-gradient(900px 500px at 85% -10%,rgba(220,56,50,.20),transparent 60%),
  radial-gradient(700px 500px at 5% 110%,rgba(218,232,239,.10),transparent 60%);pointer-events:none}
.hero__inner{position:relative;padding-block:clamp(4rem,9vw,7.5rem);max-width:900px}
.hero .kicker{color:var(--beige)}
.hero__title{font-size:var(--text-2xl);font-weight:800;line-height:1.06;margin-bottom:var(--space-6)}
.hero__accent{color:#fff;position:relative;white-space:nowrap}
.hero__accent::after{content:"";position:absolute;left:0;right:0;bottom:.06em;height:.14em;background:var(--red-brand);border-radius:2px;opacity:.95}
.hero__lead{font-size:var(--text-lg);color:rgba(255,255,255,.86);max-width:60ch;margin-bottom:var(--space-8);font-family:var(--font-body);font-weight:400;line-height:1.55}
.hero__actions{display:flex;flex-wrap:wrap;gap:var(--space-4);margin-bottom:var(--space-10)}
.hero__trust{display:flex;flex-wrap:wrap;gap:clamp(1rem,3vw,2rem);font-size:var(--text-sm);color:rgba(255,255,255,.78);font-weight:500}
.hero__trust span[role=listitem]{display:inline-flex;align-items:center;gap:.5rem}
.dot{width:7px;height:7px;border-radius:50%;background:var(--red-brand);flex-shrink:0}

/* --- Sections --- */
.section{padding-block:clamp(3.5rem,8vw,7rem)}
.section--alt{background:var(--color-surface-2)}
.section__title{font-size:var(--text-xl);font-weight:800;color:var(--color-text);margin-bottom:var(--space-4);max-width:20ch}
.section__lead{font-size:var(--text-lg);color:var(--color-text-muted);max-width:64ch;line-height:1.55;font-family:var(--font-body);margin-bottom:var(--space-12)}

/* --- Contrast (is / is not) --- */
.contrast{display:grid;grid-template-columns:1fr 1fr;gap:var(--space-6)}
.contrast__col{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-lg);padding:clamp(1.5rem,3vw,2.25rem);box-shadow:var(--shadow-sm)}
.contrast__col--is{border-top:4px solid var(--green)}
.contrast__col--isnot{border-top:4px solid var(--red-brand)}
.contrast__head{font-size:var(--text-lg);font-weight:800;color:var(--color-text);margin-bottom:var(--space-5)}
.contrast__head span{color:var(--green)}
.contrast__col--isnot .contrast__head span{color:var(--red-brand)}
.checklist li,.crosslist li{position:relative;padding-left:2rem;margin-bottom:var(--space-4);font-size:var(--text-base);color:var(--color-text);line-height:1.45}
.checklist li:last-child,.crosslist li:last-child{margin-bottom:0}
.checklist li::before{content:"";position:absolute;left:0;top:.18em;width:1.25rem;height:1.25rem;border-radius:50%;background:var(--green);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/72% no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/72% no-repeat}
.crosslist li::before{content:"";position:absolute;left:0;top:.18em;width:1.25rem;height:1.25rem;border-radius:50%;background:var(--red-brand);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E") center/64% no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E") center/64% no-repeat}

/* --- Tools --- */
.tools{display:grid;grid-template-columns:repeat(2,1fr);gap:var(--space-6);margin-bottom:var(--space-12)}
.tool{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-lg);padding:clamp(1.5rem,3vw,2rem);box-shadow:var(--shadow-sm);transition:transform var(--transition-interactive),box-shadow var(--transition-interactive),border-color var(--transition-interactive);border-left:4px solid var(--app)}
.tool:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg)}
.tool__top{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--space-4)}
.tool__tag{font-size:var(--text-xs);font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--app);background:color-mix(in srgb,var(--app) 14%,transparent);padding:.3rem .7rem;border-radius:var(--radius-full)}
.tool__bar{width:38px;height:6px;border-radius:var(--radius-full);background:var(--app);opacity:.85}
.tool__name{font-size:var(--text-lg);font-weight:800;color:var(--color-text);margin-bottom:var(--space-3)}
.tool__desc{font-size:var(--text-base);color:var(--color-text-muted);line-height:1.5;max-width:none}

/* More in the works */
.works{display:flex;align-items:center;gap:var(--space-6);background:var(--navy);color:#fff;border-radius:var(--radius-lg);padding:clamp(1.5rem,3.5vw,2.25rem);box-shadow:var(--shadow-md)}
.works__icon{flex-shrink:0;width:52px;height:52px;border-radius:var(--radius-md);display:grid;place-items:center;background:rgba(220,56,50,.25);color:#fff}
.works__title{font-size:var(--text-lg);font-weight:800;margin-bottom:var(--space-2)}
.works__desc{font-size:var(--text-base);color:rgba(255,255,255,.82);line-height:1.5;max-width:70ch}

/* --- Approach --- */
.approach{display:grid;grid-template-columns:repeat(2,1fr);gap:var(--space-8) var(--space-12);margin-top:var(--space-8)}
.approach__item{position:relative;padding-top:var(--space-2)}
.approach__num{display:block;font-family:var(--font-display);font-weight:800;font-size:var(--text-lg);color:var(--red-brand);margin-bottom:var(--space-2);letter-spacing:.02em}
.approach__item h3{font-size:var(--text-lg);font-weight:700;color:var(--color-text);margin-bottom:var(--space-2)}
.approach__item p{font-size:var(--text-base);color:var(--color-text-muted);line-height:1.5}

/* --- CTA --- */
.cta{background:var(--navy);color:#fff;padding-block:clamp(3.5rem,8vw,6.5rem);border-top:5px solid var(--red-brand);position:relative;overflow:hidden}
.cta::before{content:"";position:absolute;inset:0;background:radial-gradient(800px 400px at 90% 120%,rgba(220,56,50,.18),transparent 60%);pointer-events:none}
.cta__inner{position:relative;max-width:760px}
.cta__patriot{display:flex;align-items:center;gap:clamp(1rem,2.5vw,1.75rem);margin-bottom:var(--space-7);flex-wrap:wrap}
.cta__flag{display:flex;width:fit-content;background:#fff;padding:.85rem 1.1rem;border-radius:var(--radius-md);box-shadow:0 6px 22px rgba(0,0,0,.28)}
.cta__flag img{display:block;width:clamp(150px,22vw,200px);height:auto}
.cta__patriot-text{font-family:var(--font-display);font-weight:700;font-size:var(--text-lg);line-height:1.25;color:#fff;letter-spacing:.01em;margin:0}
@media (max-width:560px){.cta__patriot-text br{display:none}}
.cta__title{font-size:var(--text-xl);font-weight:800;margin-bottom:var(--space-4)}
.cta__lead{font-size:var(--text-lg);color:rgba(255,255,255,.85);line-height:1.55;margin-bottom:var(--space-10);font-family:var(--font-body)}
.cta__card{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.16);border-radius:var(--radius-lg);padding:clamp(1.5rem,3.5vw,2.25rem);backdrop-filter:blur(4px)}
.cta__row{margin-bottom:var(--space-5)}
.cta__label{display:block;font-family:var(--font-display);font-weight:800;font-size:var(--text-lg);color:#fff}
.cta__sub{font-size:var(--text-sm);color:var(--beige);font-weight:500}
.cta__links{display:flex;flex-wrap:wrap;gap:var(--space-4) var(--space-8);margin-bottom:var(--space-6)}
.cta__link{display:inline-flex;align-items:center;gap:.6rem;font-size:var(--text-base);font-weight:500;color:rgba(255,255,255,.92)}
.cta__link svg{color:var(--red-brand)}
.cta__link:hover{color:#fff}
.cta__btn{width:fit-content}

/* --- Footer --- */
.footer{background:#0E0F22;color:rgba(255,255,255,.7);padding-block:var(--space-12)}
.footer__inner{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:var(--space-8)}
.footer__logo{height:34px;margin-bottom:var(--space-4)}
.footer__tag{font-size:var(--text-sm);color:rgba(255,255,255,.55);font-style:italic;max-width:40ch}
.footer__meta{font-size:var(--text-sm);line-height:1.7;text-align:right}
.footer__meta a{color:var(--beige)}
.footer__meta a:hover{color:#fff}
.footer__copy{color:rgba(255,255,255,.4);margin-top:var(--space-3);font-size:var(--text-xs)}

/* --- Reveal animation --- */
.reveal{opacity:0;transform:translateY(20px);transition:opacity .7s var(--ease),transform .7s var(--ease)}
.reveal.in{opacity:1;transform:none}

/* --- Responsive --- */
@media (max-width:860px){
  .contrast,.tools,.approach{grid-template-columns:1fr}
  .footer__meta{text-align:left}
  .works{flex-direction:column;align-items:flex-start}
}
@media (max-width:680px){
  .nav a:not(.nav__cta){display:none}
  .hero__title br{display:none}
  .hero__accent{white-space:normal}
}
