/* ActuallyDoIt — shared styles. Started from the TulipByte Studio site's stylesheet, with the
   app's green accent (Green in the apps' accent picker) in place of the studio's pink. */

:root {
  --bg: #fbfdfb;
  --surface: #ffffff;
  --surface-alt: #f0f6f2;
  --text: #17301f;
  --text-muted: #4f5f55;
  --border: #dce7df;
  --accent: #1a7d3d;
  --accent-hover: #136330;
  --accent-soft: #ddf2e3;
  --on-accent: #ffffff;
  --radius: 14px;
  --max-width: 1080px;
  --shadow: 0 1px 2px rgba(23, 48, 31, 0.04), 0 8px 24px rgba(23, 48, 31, 0.06);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111412;
    --surface: #181c19;
    --surface-alt: #1f2521;
    --text: #eef3ef;
    --text-muted: #a8b3ab;
    --border: #2c342e;
    --accent: #30d158;
    --accent-hover: #5cdc7c;
    --accent-soft: #1b3324;
    --on-accent: #0b1f12;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--accent-hover);
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 0.5em;
}

h2 {
  font-size: 1.6rem;
  margin: 2em 0 0.6em;
}

h3 {
  font-size: 1.15rem;
  margin: 1.6em 0 0.4em;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.narrow {
  max-width: 760px;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
}

.brand img {
  width: 32px;
  height: 32px;
}

.site-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
}

/* Hero */

.hero {
  padding: 72px 0 56px;
  text-align: center;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
}

/* Sections */

.section {
  padding: 24px 0 64px;
}

.section-title {
  margin-top: 0;
}

/* Product cards */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.product-card header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.product-card h3 {
  margin: 0;
}

.product-card p {
  margin: 0;
  color: var(--text-muted);
}

.product-card .links {
  margin-top: auto;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 8px;
}

.app-icon {
  width: 64px;
  height: 64px;
  border-radius: 22%;
  flex-shrink: 0;
}

.tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

/* Buttons */

.button {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}

.button.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.button.secondary:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.button-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 28px;
}

/* Apple's App Store badge, used as delivered (black artwork, never recoloured or redrawn). Apple's
   guidelines: at least 40px high on screen, with clear space of a quarter of its height around it,
   which the button-row gap and the phone bar's padding provide. */

.app-store-badge {
  display: inline-block;
  line-height: 0;
  border-radius: 8px;
}

.app-store-badge img {
  display: block;
}

/* Product page */

.product-hero {
  padding: 64px 0 40px;
  text-align: center;
}

.product-hero .app-icon {
  width: 112px;
  height: 112px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.product-hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.feature {
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.feature h3 {
  margin-top: 0;
}

.feature p {
  margin: 0;
  color: var(--text-muted);
}

/* Long-form documents (privacy, support) */

.doc {
  padding: 48px 0 72px;
}

.doc .meta {
  color: var(--text-muted);
  margin-top: -0.5em;
}

.doc li {
  margin-bottom: 0.4em;
}

.callout {
  background: var(--surface-alt);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 24px 0;
}

.callout p {
  margin: 0;
}

details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 12px;
}

details summary {
  cursor: pointer;
  font-weight: 600;
}

details[open] summary {
  margin-bottom: 8px;
}

details p {
  margin: 0;
  color: var(--text-muted);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 28px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}

.section > .container > p {
  max-width: 720px;
}

.feature h3 {
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.feature ul {
  margin: 0;
  padding-left: 1.1em;
  color: var(--text-muted);
}

.feature li {
  margin-bottom: 0.4em;
}

.prose p {
  font-size: 1.1rem;
}

.lang-switch a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

/* Phone-only download bar on product pages. The footer gets matching bottom padding so the bar
   never covers it, and the bar slides away while a page download button is in view. */

.sticky-cta {
  display: none;
}

@media (max-width: 640px) {
  .sticky-cta ~ .site-footer {
    padding-bottom: calc(28px + 69px + env(safe-area-inset-bottom));
  }

  .sticky-cta {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    background: var(--surface);
    border-top: 1px solid var(--border);
    text-align: center;
    transition: transform 0.2s ease, visibility 0s;
  }

  .sticky-cta.is-hidden {
    transform: translateY(100%);
    visibility: hidden;
    transition: transform 0.2s ease, visibility 0s 0.2s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sticky-cta,
  .sticky-cta.is-hidden {
    transition: none;
  }
}

/* Screenshot gallery on the home page, filled from /screenshots/manifest.json by
   /assets/js/gallery.js. The section stays hidden when there's no manifest or no screens. */

.gallery-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.gallery-tabs button {
  font: inherit;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
}

.gallery-tabs button[aria-selected="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.gallery {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 12px;
  -webkit-overflow-scrolling: touch;
}

.gallery img,
.gallery video {
  flex: none;
  height: min(560px, 70vh);
  width: auto;
  border-radius: var(--radius);
  scroll-snap-align: start;
  background: var(--surface-alt);
  box-shadow: var(--shadow);
}

.gallery[data-device="ipad"] img,
.gallery[data-device="mac"] img,
.gallery[data-device="tablet"] img {
  height: min(440px, 50vh);
}

.product-hero .platform-note {
  margin-top: 12px;
  font-size: 0.95rem;
  color: var(--text-muted);
}
