/* Wedot Software: shared styles. Palette matches the UnAttic app's
   asset catalog (see the app's CLAUDE.md, Design). System fonts only:
   no web fonts, nothing loaded from other sites. */

:root {
  color-scheme: light dark;
  --background: #F3F9FB;
  --surface: #FFFFFF;
  --primary: #136B7A;
  --on-primary: #FFFFFF;
  --accent: #A04F12;
  --text: #0D1F24;
  --text-secondary: #3A4F55;
  --sky: #CFEAF5;
  --border: rgba(19, 107, 122, 0.16);
  --shadow: 0 1px 2px rgba(14, 79, 92, 0.06), 0 8px 24px rgba(14, 79, 92, 0.08);
  --radius: 20px;
  --max: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0B1C21;
    --surface: #142D34;
    --primary: #6EC1E4;
    --on-primary: #06262D;
    --accent: #F4B261;
    --text: #EAF4F6;
    --text-secondary: #B3C8CE;
    --sky: #123B45;
    --border: rgba(110, 193, 228, 0.18);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--background);
  /* The app's calm sky backdrop, static. */
  background-image: linear-gradient(170deg, var(--background) 0%, var(--sky) 55%, var(--background) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--primary); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--surface);
  color: var(--primary);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.skip-link:focus { top: 1rem; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.site-header { padding: 1rem 0; }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  min-height: 44px;
}
.brand img { width: 32px; height: 32px; border-radius: 22.37%; }
/* The wordmark is 640×134. Fixed width and height, and no shrinking:
   with width: auto inside the flex link, Safari squeezed it narrow. */
.brand picture { display: block; flex-shrink: 0; }
.brand img.brand-logo { width: 191px; height: 40px; max-width: none; border-radius: 0; }
@media (max-width: 480px) {
  .brand img.brand-logo { width: 153px; height: 32px; }
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.25rem;
  text-decoration: none;
  font-weight: 500;
}
.site-nav a:hover { text-decoration: underline; }
/* The UnAttic header (mark + name), light or dark to match the page. */
.nav-header { display: block; height: 28px; width: auto; }
.site-nav a[aria-current="page"] { color: var(--text); text-decoration: underline; }

main { flex: 1; padding-bottom: 3rem; }

/* Type */
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.6rem; }
h1 { font-size: clamp(2.1rem, 6vw, 3.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); letter-spacing: -0.01em; margin-top: 0.5rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
.lead { font-size: clamp(1.1rem, 2.6vw, 1.3rem); color: var(--text-secondary); max-width: 40rem; }
.muted { color: var(--text-secondary); }
.eyebrow { color: var(--primary); font-weight: 600; margin-bottom: 0.4rem; }

/* Sections and cards */
.section { padding: 2.5rem 0; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}

/* Hero */
.hero { padding: 2.5rem 0 1.5rem; }
.hero-app {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}
@media (min-width: 760px) {
  .hero-app { grid-template-columns: auto 1fr; gap: 2.5rem; }
}
.app-icon {
  width: 128px;
  height: 128px;
  border-radius: 22.37%;
  box-shadow: var(--shadow);
}
@media (min-width: 760px) { .app-icon { width: 176px; height: 176px; } }

.hero-with-photo {
  grid-template-areas: "icon" "intro" "photo";
  gap: 1rem;
}
.hero-with-photo > picture:first-child { grid-area: icon; align-self: end; }
.hero-with-photo > div { grid-area: intro; align-self: start; min-width: 0; }
.hero-with-photo .app-icon { width: 72px; height: 72px; }
.hero-photo { grid-area: photo; display: block; }
.hero-photo img { width: 100%; border-radius: var(--radius); }
@media (min-width: 760px) {
  .hero-with-photo {
    grid-template-areas: "icon photo" "intro photo";
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    column-gap: clamp(1.5rem, 4vw, 3rem);
    row-gap: 0.5rem;
  }
  .hero-with-photo .app-icon { width: 80px; height: 80px; }
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
  text-decoration: none;
}
.button:hover { filter: brightness(0.93); text-decoration: none; }
.button-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

/* Apple's official "Download on the App Store" badge: use it unaltered. */
.app-store-link { display: inline-block; margin: 0.5rem 0 1rem; }
.app-store-link img { height: 54px; width: auto; }

/* App cards on the studio home */
.app-list { list-style: none; padding: 0; margin: 0; }
.app-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}
.app-card img { width: 72px; height: 72px; border-radius: 22.37%; }
.app-card h3 { margin: 0; color: var(--primary); }
.app-card p { margin: 0.2rem 0 0; color: var(--text-secondary); }
.app-card:hover h3 { text-decoration: underline; }

/* Screenshot gallery: swipeable row on phones, wraps on wide screens. */
.gallery {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.5rem 0.25rem 1rem;
  margin: 0;
  list-style: none;
}
.gallery li { flex: 0 0 auto; scroll-snap-align: start; margin: 0; }
.gallery img {
  width: 230px;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
@media (min-width: 1000px) {
  .gallery { justify-content: center; overflow-x: visible; flex-wrap: wrap; }
  .gallery img { width: 160px; }
}
.gallery figcaption { font-size: 0.9rem; color: var(--text-secondary); margin-top: 0.5rem; max-width: 230px; }
@media (min-width: 1000px) { .gallery figcaption { max-width: 160px; } }
.gallery figure { margin: 0; }

/* Features */
.feature h3 { display: flex; align-items: center; gap: 0.5rem; }
.feature p { margin: 0; color: var(--text-secondary); }
.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  vertical-align: middle;
}

/* Free vs Pro */
.plans { display: grid; gap: 1rem; }
@media (min-width: 760px) { .plans { grid-template-columns: 1fr 1fr; } }
.plans ul { padding-left: 1.2rem; margin: 0 0 0.5rem; }
.plans li { margin-bottom: 0.35rem; }
/* Prices use the text color: the amber accent is kept for "could free up" highlights, as in the app. */
.price { font-family: var(--font-rounded); font-size: 1.6rem; font-weight: 700; color: var(--text); margin: 0 0 0.5rem; }
.price-line { font-size: 1.15rem; margin: 0 0 0.5rem; }
.price-line strong { font-family: var(--font-rounded); font-size: 1.35rem; }

/* Long-form pages: privacy, terms, support */
.prose { max-width: 46rem; }
.prose h2 { margin-top: 2rem; }
.prose ul { padding-left: 1.3rem; }
.prose li { margin-bottom: 0.4rem; }
.draft-note {
  border-left: 4px solid var(--accent);
  background: var(--surface);
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  margin: 1rem 0 1.5rem;
}

/* FAQ: native disclosure, works without JavaScript and with keyboards. */
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 0.75rem;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  position: relative;
  padding: 1rem 1.25rem 1rem 2.4rem;
  font-weight: 600;
  min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
/* Our own chevron, drawn inside the card (the native marker can sit outside it). */
.faq summary::before {
  content: "";
  position: absolute;
  left: 1.1rem;
  top: 1.6rem;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}
.faq details[open] > summary::before { transform: rotate(45deg); }
.faq details > div { padding: 0 1.25rem 1rem 2.4rem; }
.faq ol, .faq ul { padding-left: 1.2rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; justify-content: space-between; align-items: center; }
.site-footer .wrap > p { margin: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer .langs { flex-basis: 100%; }
.site-footer .langs a[aria-current="true"] { color: var(--text); font-weight: 600; text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Free vs Pro comparison table: scrolls sideways on its own if it has to. */
.table-wrap { overflow-x: auto; margin: 1rem 0; }
.compare {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.compare caption { text-align: left; font-weight: 600; padding: 0 0 0.5rem; }
.compare th, .compare td {
  text-align: left;
  vertical-align: top;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
}
.compare thead th { border-top: 0; background: color-mix(in srgb, var(--primary) 10%, var(--surface)); }
.compare td { color: var(--text-secondary); }
.compare th[scope="row"] { font-weight: 600; color: var(--text); }

/* Feature page: a block per feature, screenshot beside the text on wide screens. */
.feature-block { display: grid; gap: 1.25rem; align-items: center; }
.feature-block + .feature-block { margin-top: 1rem; }
.feature-block img {
  width: min(100%, 260px);
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
@media (min-width: 760px) {
  .feature-block.has-shot { grid-template-columns: 260px 1fr; }
}
.feature-block h2, .feature-block h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0; }
.feature-block ul { padding-left: 1.2rem; margin: 0.5rem 0 0; }
.feature-block li { margin-bottom: 0.35rem; }
.savings { color: var(--accent); font-weight: 600; }

/* Help pages: the short silent how-to video. */
.guide-video { display: block; width: 100%; max-width: 20rem; height: auto; aspect-ratio: 9 / 16; margin: 1.25rem 0 0.5rem; border-radius: 1rem; background: #0B1C21; box-shadow: 0 0.5rem 1.5rem rgba(11, 28, 33, 0.25); }
.video-note { font-size: 0.9rem; opacity: 0.85; margin-top: 0; }
