/* =============================================================================
   Aquarium Apps - shared stylesheet
   Design tokens: purpose-named, not value-named
   Anti-references: no Inter, no gray card grids on #F9FAFB, no gradient hero
   Scene: Jira admin on a laptop, business hours, evaluating a Marketplace app
   ============================================================================= */

/* --- Design Tokens ---------------------------------------------------------- */
:root {
  /* Color */
  --color-ground:        #ffffff;
  --color-ink:           #172b4d;   /* Atlassian dark navy - pairs with brand blue */
  --color-ink-muted:     #5e6e8a;   /* Secondary text */
  --color-rule:          #dfe1e6;   /* Borders and dividers */
  --color-surface:       #f4f5f7;   /* Subtle backgrounds (feature rows, table) */
  --color-action:        #0052cc;   /* Atlassian blue - links, CTA, accent */
  --color-action-hover:  #0747a6;   /* Darkened action on hover */
  --color-action-text:   #ffffff;   /* Text on action background */
  --color-warning:       #974f0c;   /* Draft / attention accent (Atlassian y500) */
  --color-warning-surface: #fffae6; /* Draft / attention background (Atlassian y50) */

  /* Typography */
  --font-body:    -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-md: 1rem;       /* 16px - base */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.5rem;     /* 24px */
  --font-size-2xl: 2rem;      /* 32px */
  --font-size-3xl: 2.75rem;   /* 44px */
  --line-height-body:    1.6;
  --line-height-heading: 1.2;

  /* Spacing (8px base scale) */
  --space-xs:      0.25rem;   /* 4px */
  --space-sm:      0.5rem;    /* 8px */
  --space-md:      1rem;      /* 16px */
  --space-lg:      1.5rem;    /* 24px */
  --space-xl:      2rem;      /* 32px */
  --space-2xl:     3rem;      /* 48px */
  --space-section: 5rem;      /* 80px - section vertical rhythm */

  /* Layout */
  --width-max:     800px;
  --width-prose:   65ch;
  --radius-card:   6px;
}

/* --- Reset & Base ----------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: var(--font-size-md);
  line-height: var(--line-height-body);
  color: var(--color-ink);
  background-color: var(--color-ground);
}

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

/* --- Layout: Container ------------------------------------------------------ */
.container {
  max-width: var(--width-max);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

/* --- Navigation ------------------------------------------------------------- */
nav {
  border-bottom: 1px solid var(--color-rule);
  padding-block: var(--space-md);
}

nav .container {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-logo {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-ink);
  text-decoration: none;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.nav-logo:hover {
  color: var(--color-action);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
}

.nav-links a {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-ink-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--color-action);
}

/* --- Product Logo ----------------------------------------------------------- */
.product-logo {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-card);
  margin-bottom: var(--space-lg);
  display: block;
}

/* --- Hero ------------------------------------------------------------------- */
.hero {
  padding-top: var(--space-section);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--color-rule);
}

.hero-headline {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  line-height: var(--line-height-heading);
  letter-spacing: -0.02em;
  max-width: 22ch;
  margin-bottom: var(--space-lg);
}

.hero-subhead {
  font-size: var(--font-size-xl);
  font-weight: 400;
  color: var(--color-ink-muted);
  max-width: 40ch;
  line-height: var(--line-height-body);
}

/* --- Product Cards ---------------------------------------------------------- */
.products {
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-section);
}

.products-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  margin-top: var(--space-xl);
}

.product-card {
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-card);
  padding: var(--space-xl);
}

.product-card h2 {
  font-size: var(--font-size-xl);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-sm);
}

.product-card h2 a {
  color: inherit;
  text-decoration: none;
}

.product-card h2 a:hover {
  color: var(--color-action);
}

.product-card .product-category {
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-action);
  margin-bottom: var(--space-md);
}

.product-card p {
  color: var(--color-ink-muted);
  margin-bottom: var(--space-lg);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-body);
}

.product-link {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-action);
  text-decoration: none;
}

.product-link + .product-link {
  margin-top: var(--space-xs);
}

.product-link:hover {
  color: var(--color-action-hover);
  text-decoration: underline;
}

/* --- Product Groups (platform sections) ------------------------------------- */
.product-group {
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--color-rule);
}

.product-group:first-child {
  padding-top: 0;
  border-top: none;
}

.product-group-header {
  margin-bottom: var(--space-xl);
  list-style: none;
  cursor: pointer;
}

.product-group-header::-webkit-details-marker {
  display: none;
}

.product-group-label {
  font-size: var(--font-size-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-ink-muted);
  margin-bottom: var(--space-xs);
}

.product-group-label::after {
  content: ' ▾';
  font-weight: normal;
  letter-spacing: 0;
}

details:not([open]) .product-group-label::after {
  content: ' ▸';
}

.product-group-desc {
  font-size: var(--font-size-sm);
  color: var(--color-ink-muted);
}

.product-group-desc a {
  color: var(--color-action);
  text-decoration: none;
}

.product-group-desc a:hover {
  text-decoration: underline;
}

/* --- Coming Soon Card ------------------------------------------------------- */
.product-card--soon {
  background-color: var(--color-surface);
  border-color: transparent;
}

.product-card--soon h2 {
  color: var(--color-ink-muted);
}

.product-card--soon .product-category {
  color: var(--color-ink-muted);
}

/* --- Feature List ----------------------------------------------------------- */
.features {
  padding-block: var(--space-section);
  border-top: 1px solid var(--color-rule);
}

.features h2 {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xl);
}

.feature-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md) var(--space-xl);
}

.feature-list li {
  font-size: var(--font-size-md);
  padding-left: var(--space-lg);
  position: relative;
  color: var(--color-ink);
}

.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-action);
}

/* --- Pricing Table ---------------------------------------------------------- */
.pricing {
  padding-block: var(--space-section);
  border-top: 1px solid var(--color-rule);
}

.pricing h2 {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xl);
}

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.pricing-table th {
  text-align: left;
  padding: var(--space-sm) var(--space-md);
  font-weight: 600;
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-ink-muted);
  border-bottom: 2px solid var(--color-rule);
}

.pricing-table td {
  padding: var(--space-md);
  border-bottom: 1px solid var(--color-rule);
  vertical-align: top;
}

.pricing-table tr:last-child td {
  border-bottom: none;
}

.pricing-table tbody tr:nth-child(even) td {
  background-color: var(--color-surface);
}

.pricing-table .tier-name {
  font-weight: 600;
  color: var(--color-ink);
}

.pricing-table .tier-price {
  font-weight: 600;
  color: var(--color-action);
}

/* --- CTA -------------------------------------------------------------------- */
.cta-section {
  padding-block: var(--space-section);
  border-top: 1px solid var(--color-rule);
}

.btn-primary {
  display: inline-block;
  padding: var(--space-md) var(--space-xl);
  background-color: var(--color-action);
  color: var(--color-action-text);
  font-size: var(--font-size-md);
  font-weight: 600;
  font-family: var(--font-body);
  text-decoration: none;
  border-radius: var(--radius-card);
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.btn-primary:hover {
  background-color: var(--color-action-hover);
}

/* --- Notice / Coming Soon --------------------------------------------------- */
.notice {
  border: 1px solid var(--color-rule);
  border-left: 4px solid var(--color-action);
  border-radius: var(--radius-card);
  padding: var(--space-lg) var(--space-xl);
  background-color: var(--color-surface);
  font-size: var(--font-size-md);
  color: var(--color-ink-muted);
  margin-top: var(--space-xl);
}

.notice-draft {
  border: 1px solid var(--color-warning);
  border-left: 4px solid var(--color-warning);
  border-radius: var(--radius-card);
  padding: var(--space-lg) var(--space-xl);
  background-color: var(--color-warning-surface);
  font-size: var(--font-size-md);
  color: var(--color-warning);
  font-weight: 600;
  margin-bottom: var(--space-xl);
}

/* --- Breadcrumb ------------------------------------------------------------- */
.breadcrumb {
  font-size: var(--font-size-sm);
  color: var(--color-ink-muted);
  max-width: var(--width-prose);
  padding-top: var(--space-section);
  padding-bottom: var(--space-sm);
}

.breadcrumb a {
  color: var(--color-action);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb-sep {
  margin-inline: 0.4em;
  color: var(--color-rule);
}

/* --- Page Content (legal / support prose) ----------------------------------- */
.page-content {
  max-width: var(--width-prose);
  padding-block: var(--space-section);
}

.page-content h1 {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.page-content .last-updated {
  font-size: var(--font-size-sm);
  color: var(--color-ink-muted);
  margin-bottom: var(--space-2xl);
}

.page-content h2 {
  font-size: var(--font-size-lg);
  font-weight: 700;
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
}

.page-content h3 {
  font-size: var(--font-size-md);
  font-weight: 700;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}

.page-content p,
.page-content li {
  font-size: var(--font-size-md);
  color: var(--color-ink);
  line-height: var(--line-height-body);
  margin-bottom: var(--space-md);
}

.page-content ul,
.page-content ol {
  padding-left: var(--space-xl);
}

.page-content dt {
  font-weight: 700;
  color: var(--color-ink);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-xs);
}

.page-content dd {
  padding-left: var(--space-xl);
  color: var(--color-ink);
  margin-bottom: var(--space-md);
  line-height: var(--line-height-body);
  font-size: var(--font-size-md);
}

.page-content .faq-section {
  margin-bottom: var(--space-md);
}

.page-content .faq-item {
  border-top: 1px solid var(--color-rule);
}

.page-content .faq-item:last-child {
  border-bottom: 1px solid var(--color-rule);
}

.page-content .faq-question {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-md);
  font-weight: 700;
  font-size: var(--font-size-md);
  color: var(--color-ink);
  padding-block: var(--space-md);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.page-content .faq-question::-webkit-details-marker {
  display: none;
}

.page-content .faq-question::after {
  content: '▾';
  font-weight: normal;
  color: var(--color-ink-muted);
  flex-shrink: 0;
}

.page-content .faq-item:not([open]) .faq-question::after {
  content: '▸';
}

.page-content .faq-answer {
  padding-left: var(--space-lg);
  padding-bottom: var(--space-md);
  color: var(--color-ink);
  line-height: var(--line-height-body);
  font-size: var(--font-size-md);
}

.page-content pre {
  background-color: var(--color-surface);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-card);
  padding: var(--space-md) var(--space-lg);
  margin-block: var(--space-md);
  overflow-x: auto;
}

.page-content code {
  font-size: var(--font-size-sm);
  font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace;
}

/* --- Footer ----------------------------------------------------------------- */
footer {
  border-top: 1px solid var(--color-rule);
  padding-block: var(--space-xl);
  margin-top: auto;
}

footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
}

.footer-links a {
  font-size: var(--font-size-sm);
  color: var(--color-ink-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--color-action);
  text-decoration: underline;
}

.footer-copy {
  font-size: var(--font-size-sm);
  color: var(--color-ink-muted);
}

/* --- About Callout ---------------------------------------------------------- */
.about-callout {
  padding-block: var(--space-2xl);
  border-top: 1px solid var(--color-rule);
}

.about-callout p {
  font-size: var(--font-size-md);
  color: var(--color-ink-muted);
}

.about-callout a {
  color: var(--color-action);
  text-decoration: none;
  font-weight: 500;
}

.about-callout a:hover {
  text-decoration: underline;
}

/* --- Responsive: Tablet (≤ 640px) ------------------------------------------ */
@media (max-width: 640px) {
  :root {
    --space-section: 3rem;   /* 48px on mobile */
    --font-size-3xl: 2rem;   /* 32px headline on mobile */
    --font-size-2xl: 1.5rem; /* 24px on mobile */
  }

  nav .container {
    gap: var(--space-md);
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .feature-list {
    grid-template-columns: 1fr;
  }

  footer .container {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* --- Responsive: Mobile (≤ 400px) ------------------------------------------ */
@media (max-width: 400px) {
  :root {
    --font-size-3xl: 1.75rem;
  }

  .nav-links {
    gap: var(--space-md);
  }
}
