/* Bucketmail — site styles. No external fonts, scripts or trackers. */

:root {
  --indigo-900: #1c2466;
  --indigo-700: #2a3a9e;
  --indigo: #3a59db;
  --blue: #3f6fe6;
  --teal: #1bb5c8;
  --coral: #ff6b57;

  --bg: #ffffff;
  --bg-soft: #f4f6fb;
  --bg-card: #ffffff;
  --text: #121631;
  --text-2: #4a5070;
  --text-3: #7a809c;
  --line: #e3e7f1;
  --accent: var(--indigo);
  --accent-text: #2f4bc6;
  --code-bg: #eef1f8;
  --shadow: 0 1px 2px rgba(18, 22, 49, .06), 0 12px 32px rgba(18, 22, 49, .08);
  --shadow-lg: 0 30px 80px rgba(18, 22, 49, .22);
  --radius: 18px;
  --max: 1120px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0e1d;
    --bg-soft: #11152a;
    --bg-card: #151a33;
    --text: #eef0fa;
    --text-2: #b4b9d4;
    --text-3: #8389a8;
    --line: #262c4d;
    --accent: #6f9bff;
    --accent-text: #8fb1ff;
    --code-bg: #1b2140;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
code, kbd, pre { font-family: var(--mono); font-size: .88em; }
code { background: var(--code-bg); padding: .12em .4em; border-radius: 6px; }
pre {
  background: var(--code-bg); padding: 16px 18px; border-radius: 12px;
  overflow-x: auto; line-height: 1.5; border: 1px solid var(--line);
}
pre code { background: none; padding: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--bg); padding: 8px 12px; z-index: 100; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; }
.brand img { width: 34px; height: 34px; border-radius: 8px; box-shadow: 0 2px 6px rgba(18, 22, 49, .18); }
.brand small { font-weight: 500; color: var(--text-3); font-size: .78rem; margin-left: 2px; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a { color: var(--text-2); text-decoration: none; padding: 8px 12px; border-radius: 10px; font-size: .95rem; font-weight: 500; }
.nav a:hover { color: var(--text); background: var(--bg-soft); }
.nav a[aria-current="page"] { color: var(--text); background: var(--bg-soft); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 1rem;
  text-decoration: none; border: 0; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: #fff; color: var(--indigo-700); box-shadow: 0 8px 24px rgba(10, 16, 60, .25); }
.btn-ghost { color: #fff; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .35); }
.btn-solid { background: var(--indigo); color: #fff; }

/* Hero */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(1200px 500px at 85% 110%, rgba(27, 181, 200, .55), transparent 60%),
    radial-gradient(900px 500px at 10% -10%, rgba(28, 36, 102, .9), transparent 60%),
    linear-gradient(135deg, var(--indigo-700) 0%, var(--indigo) 55%, #2a8fd6 100%);
  padding: 88px 0 0;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600; letter-spacing: .02em;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); padding: 6px 12px; border-radius: 999px; margin-bottom: 22px; }
.hero .eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }
.hero h1 { color: #fff; }
.hero .lede { font-size: clamp(1.1rem, 1.9vw, 1.3rem); color: rgba(255, 255, 255, .88); max-width: 34em; margin-bottom: 30px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.hero .platforms { font-size: .9rem; color: rgba(255, 255, 255, .75); }
.hero-shots { position: relative; height: 560px; }
.hero-shots .phone {
  position: absolute; width: 270px; border-radius: 40px; overflow: hidden;
  box-shadow: 0 40px 90px rgba(8, 12, 48, .5), 0 0 0 8px #0d1030, 0 0 0 9px rgba(255, 255, 255, .15);
}
.hero-shots .phone.front { right: 150px; top: 20px; z-index: 2; }
.hero-shots .phone.back { right: -10px; top: 90px; transform: rotate(4deg); opacity: .96; }

.hero-mac { margin-top: 64px; }
.hero-mac img { border-radius: 14px 14px 0 0; box-shadow: var(--shadow-lg); margin: 0 auto; }

/* Sections */
section { padding: 96px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head p { color: var(--text-2); font-size: 1.12rem; }
.kicker { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 10px; }

/* Feature grid */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.feature p { color: var(--text-2); margin: 0; font-size: .98rem; }
.icon-badge {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px;
  background: linear-gradient(135deg, var(--indigo), var(--teal)); color: #fff;
}
.icon-badge svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Split feature rows */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.split + .split { margin-top: 110px; }
.split.reverse .split-media { order: -1; }
.split h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.split p { color: var(--text-2); }
.checks { list-style: none; padding: 0; margin: 20px 0 0; }
.checks li { position: relative; padding-left: 30px; margin-bottom: 10px; color: var(--text-2); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--indigo) 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.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/12px no-repeat;
}
.shot { border-radius: 20px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.shot.phone-shot { width: 100%; max-width: min(330px, 100%); margin: 0 auto; border-radius: 36px; }
.shot.ipad-shot { width: 100%; max-width: min(520px, 100%); margin: 0 auto; border-radius: 22px; }

/* Screenshot gallery */
.gallery-tabs { display: flex; justify-content: center; gap: 8px; margin-bottom: 36px; flex-wrap: wrap; }
.gallery-tabs button {
  font: inherit; font-weight: 600; font-size: .95rem; color: var(--text-2); background: var(--bg-card);
  border: 1px solid var(--line); padding: 9px 18px; border-radius: 999px; cursor: pointer;
}
.gallery-tabs button[aria-selected="true"] { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.gallery-panel { display: grid; gap: 28px; align-items: start; }
.gallery-panel[hidden] { display: none; }
.gallery-panel.iphone { grid-template-columns: repeat(4, 1fr); }
.gallery-panel.ipad { grid-template-columns: repeat(3, 1fr); }
.gallery-panel.mac { grid-template-columns: 1fr 1fr; }
.gallery-panel figure { margin: 0; }
.gallery-panel figcaption { text-align: center; color: var(--text-3); font-size: .9rem; margin-top: 14px; }
.gallery-panel.iphone img { border-radius: 30px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.gallery-panel.ipad img { border-radius: 18px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.gallery-panel.mac img { border-radius: 12px; box-shadow: var(--shadow); }

/* How it works flow */
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: stretch; gap: 14px; }
.flow-step { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px; box-shadow: var(--shadow); text-align: center; }
.flow-step .num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--code-bg); color: var(--accent-text); font-weight: 700; font-size: .85rem; margin-bottom: 10px; }
.flow-step h3 { margin-bottom: .3em; font-size: 1.08rem; }
.flow-step p { color: var(--text-2); font-size: .92rem; margin: 0; }
.flow-step.you { background: linear-gradient(135deg, var(--indigo-700), var(--indigo) 60%, #2a8fd6); color: #fff; border: 0; }
.flow-step.you p { color: rgba(255, 255, 255, .85); }
.flow-step.you .num { background: rgba(255, 255, 255, .2); color: #fff; }
.flow-arrow { display: grid; place-items: center; color: var(--text-3); }
.flow-arrow svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 2; }
.send-row { margin-top: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.send-card { border: 1px dashed var(--line); border-radius: var(--radius); padding: 22px 24px; background: var(--bg); }
.send-card h3 { display: flex; align-items: center; gap: 10px; }
.send-card p { color: var(--text-2); margin: 0; font-size: .96rem; }
.tag { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: var(--code-bg); color: var(--accent-text); }

/* Privacy band */
.privacy-band {
  color: #fff; border-radius: 28px; padding: 56px;
  background: radial-gradient(700px 300px at 100% 100%, rgba(27, 181, 200, .5), transparent 60%), linear-gradient(135deg, var(--indigo-900), var(--indigo-700));
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center;
}
.privacy-band h2 { color: #fff; }
.privacy-band p { color: rgba(255, 255, 255, .82); }
.privacy-band .checks li { color: rgba(255, 255, 255, .9); }
.privacy-band .checks li::before { background-color: var(--teal); }
.privacy-band a { color: #fff; }

/* CTA */
.cta-band { text-align: center; }
.cta-band img { width: 112px; height: 112px; border-radius: 26px; margin: 0 auto 24px; box-shadow: var(--shadow-lg); }
.cta-band p { color: var(--text-2); font-size: 1.1rem; }

/* Document pages (setup, privacy, support) */
.page-hero { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 64px 0 48px; }
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.page-hero p { color: var(--text-2); font-size: 1.15rem; max-width: 42em; margin: 0; }
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; padding: 56px 0 96px; }
.doc.single { grid-template-columns: minmax(0, 760px); justify-content: center; }
.toc { position: sticky; top: 88px; align-self: start; font-size: .92rem; }
.toc strong { display: block; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 10px; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -2px; color: var(--text-2); text-decoration: none; border-left: 2px solid transparent; }
.toc a:hover { color: var(--text); border-left-color: var(--accent); }
.prose { max-width: 760px; }
.prose h2 { font-size: 1.65rem; margin-top: 2.2em; padding-top: .2em; scroll-margin-top: 90px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.8em; scroll-margin-top: 90px; }
.prose p, .prose li { color: var(--text-2); }
.prose strong { color: var(--text); }
.prose ol, .prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: .45em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0 1.6em; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--text); font-weight: 650; background: var(--bg-soft); }
.prose td { color: var(--text-2); }
.callout { border: 1px solid var(--line); border-left: 4px solid var(--accent); background: var(--bg-soft); padding: 16px 20px; border-radius: 12px; margin: 1.4em 0; }
.callout p:last-child { margin-bottom: 0; }
.callout.warn { border-left-color: var(--coral); }
.updated { color: var(--text-3); font-size: .92rem; }
.faq details { border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; margin-bottom: 12px; background: var(--bg-card); }
.faq summary { cursor: pointer; font-weight: 650; color: var(--text); }
.faq details[open] summary { margin-bottom: 10px; }
.faq details p:last-child { margin-bottom: 0; }
.contact-card { display: flex; gap: 20px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: var(--bg-card); box-shadow: var(--shadow); margin: 1.2em 0 2em; }
.contact-card .icon-badge { margin: 0; flex: none; }
.contact-card p { margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; font-size: .92rem; color: var(--text-3); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* Responsive */
@media (max-width: 980px) {
  .hero-grid, .split, .privacy-band { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-top: 64px; }
  .hero-shots { height: 520px; max-width: 460px; margin: 0 auto; width: 100%; }
  .hero-shots .phone.front { right: auto; left: 0; }
  .hero-shots .phone.back { right: 0; }
  .split { gap: 36px; }
  .split.reverse .split-media { order: 0; }
  .features { grid-template-columns: 1fr 1fr; }
  .flow { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); height: 26px; }
  .gallery-panel.iphone { grid-template-columns: 1fr 1fr; }
  .gallery-panel.ipad { grid-template-columns: 1fr 1fr; }
  .doc, .doc.single { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .toc { position: static; }
  .privacy-band { padding: 40px 28px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  section { padding: 72px 0; }
  .brand small { display: none; }
  .nav a { padding: 8px 8px; font-size: .9rem; }
  .nav .hide-sm { display: none; }
  .features, .send-row, .gallery-panel.mac, .gallery-panel.ipad { grid-template-columns: 1fr; }
  .hero-shots { height: 440px; }
  .hero-shots .phone { width: 205px; border-radius: 30px; }
  .hero-shots .phone.back { top: 70px; }
  .contact-card { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
