/* Shop pages, forms and account area. Uses the same tokens and type system as landing.css. */

.page {
  max-width: 1440px;
  margin: auto;
  padding: 70px 6% 90px;
}

.page-narrow {
  max-width: 560px;
}

.page h1 {
  font-family: 'Barlow Condensed', 'Arial Narrow', Impact, sans-serif;
  font-weight: 700;
  font-size: clamp(54px, 6vw, 84px);
  letter-spacing: -1px;
  line-height: .98;
  margin: 18px 0 26px;
}

.page h1 em {
  font-family: Georgia, serif;
  font-weight: normal;
  font-style: italic;
  color: var(--red);
  letter-spacing: -3px;
}

.page .lede {
  font-size: 17px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 560px;
}

.page h2.section-title {
  font-family: 'Barlow Condensed', 'Arial Narrow', Impact, sans-serif;
  font-size: 40px;
  margin: 0 0 18px;
  line-height: 1;
}

.muted {
  color: var(--muted);
}

/* Flash messages */
.flash {
  border: 1px solid var(--ink);
  background: #f3ecdb;
  padding: 16px 20px;
  margin: 0 6% 0;
  max-width: 1440px;
  margin-inline: auto;
  font-size: 14px;
  line-height: 1.6;
}

.flash-alert {
  border-color: var(--red);
  color: #6e2619;
}

.flash-wrap {
  padding-top: 24px;
}

/* Buttons */
.button-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  display: inline-block;
  padding: 15px 25px;
  font-size: 14px;
  font-weight: 700;
}

.button-ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

button.button,
input[type="submit"].button {
  font: inherit;
}

.button[disabled],
button[disabled] {
  opacity: .55;
  cursor: not-allowed;
}

.button-link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--red);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 28px;
}

/* Forms */
.form {
  display: grid;
  gap: 22px;
  margin-top: 28px;
}

.field label,
.field .label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .4px;
  margin-bottom: 8px;
}

.field input[type="email"],
.field input[type="password"],
.field input[type="text"],
.field input[type="number"],
.field input[type="url"],
.field input[type="search"],
.field input[type="file"],
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #f6f1e3;
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 13px 14px;
}

.field textarea {
  min-height: 130px;
  resize: vertical;
  line-height: 1.6;
}

.field .hint {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.5;
}

.field .errors {
  display: block;
  font-size: 13px;
  color: var(--red);
  margin-top: 6px;
  font-weight: 700;
}

.field-error input,
.field-error select,
.field-error textarea {
  border-color: var(--red);
}

.checkbox {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
}

.checkbox input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--red);
}

.checkbox small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.form-error-summary {
  border: 1px solid var(--red);
  color: #6e2619;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 700;
}

/* Panels and product page */
.panel {
  border: 1px solid var(--line);
  background: #f3ecdb;
  padding: 28px;
}

.product-layout {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 60px;
  align-items: start;
  margin-top: 40px;
}

.product-gallery {
  display: grid;
  gap: 20px;
}

.product-gallery img {
  width: 100%;
  height: auto;
  display: block;
  background: #d1c7ac;
  box-shadow: 12px 12px 0 #cec5ad;
}

.product-gallery figure {
  margin: 0;
}

.product-gallery figcaption {
  font-size: 11px;
  letter-spacing: 1.4px;
  color: var(--muted);
  margin-top: 10px;
}

.product-buy {
  position: sticky;
  top: 24px;
  background: var(--ink);
  color: var(--paper);
  padding: 34px 32px;
  border: 7px double #6c6757;
  box-shadow: 12px 12px 0 #cec5ad;
}

.product-buy .eyebrow {
  color: #b7ac94;
}

.product-buy h2 {
  font-family: 'Barlow Condensed', Impact, sans-serif;
  font-size: 58px;
  line-height: .95;
  margin: 14px 0 10px;
}

.product-buy .price {
  font-family: 'Barlow Condensed', Impact, sans-serif;
  font-size: 44px;
  line-height: 1;
  margin: 18px 0 6px;
  color: #ead3b8;
}

.product-buy .price-note {
  font-size: 12px;
  color: #b4ad9c;
  line-height: 1.6;
  margin: 0;
}

.product-buy .button {
  width: 100%;
  text-align: center;
  margin-top: 26px;
}

.product-buy .button-ghost {
  width: 100%;
  text-align: center;
  color: var(--paper);
  border-color: var(--paper);
  margin-top: 14px;
}

.product-buy .button-ghost:hover {
  background: var(--paper);
  color: var(--ink);
}

.product-buy .status-line {
  font-size: 14px;
  line-height: 1.7;
  color: #d8d1bf;
  margin: 20px 0 0;
}

.spec-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.spec-list li {
  border-top: 1px solid var(--line);
  padding: 14px 0;
  line-height: 1.7;
  font-size: 15px;
}

.spec-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.feature-list {
  padding-left: 21px;
  line-height: 1.9;
  font-size: 15px;
}

.product-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 70px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.tag-row li {
  border: 1px solid var(--line);
  padding: 5px 8px;
  font-size: 10px;
  letter-spacing: .6px;
  font-weight: 700;
}

/* Status badges: coming soon, pending, paid, failed */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  padding: 6px 10px;
  border: 1px solid currentColor;
  text-transform: uppercase;
}

.badge-soon { color: var(--muted); }
.badge-pending { color: #7a5a14; }
.badge-paid { color: #2f5a2b; }
.badge-failed { color: var(--red); }

/* Account area */
.account-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 50px;
  margin-top: 40px;
  align-items: start;
}

.account-nav {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--ink);
}

.account-nav a {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  font-size: 15px;
}

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

.plugin-list {
  display: grid;
  gap: 22px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.plugin-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  border: 1px solid var(--line);
  background: #f3ecdb;
  padding: 24px 26px;
}

.plugin-card h3 {
  font-family: 'Barlow Condensed', Impact, sans-serif;
  font-size: 36px;
  margin: 0 0 6px;
  line-height: 1;
}

.plugin-card .release-meta {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.7;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-top: 22px;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.data-table th {
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
}

.table-scroll {
  overflow-x: auto;
}

/* Newsletter module: discreet, under the closing section */
.promo {
  max-width: 1440px;
  margin: auto;
  padding: 50px 6%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  border-top: 1px solid var(--line);
}

.promo h2 {
  font-family: 'Barlow Condensed', Impact, sans-serif;
  font-size: 40px;
  line-height: 1;
  margin: 12px 0 0;
}

.promo form {
  display: grid;
  gap: 16px;
}

.promo .inline {
  display: flex;
  gap: 10px;
}

.promo .inline input[type="email"] {
  flex: 1;
  font: inherit;
  font-size: 15px;
  padding: 13px 14px;
  border: 1px solid var(--ink);
  background: #f6f1e3;
  color: var(--ink);
  border-radius: 0;
  min-width: 0;
}

.promo .inline .button {
  white-space: nowrap;
}

.promo .checkbox {
  font-size: 13px;
}

/* Legal pages */
.legal {
  max-width: 760px;
  line-height: 1.8;
  font-size: 16px;
}

.legal h2 {
  font-family: 'Barlow Condensed', Impact, sans-serif;
  font-size: 34px;
  margin: 44px 0 10px;
  line-height: 1;
}

.legal .draft-banner {
  border: 1px dashed var(--red);
  color: #6e2619;
  padding: 14px 18px;
  font-size: 14px;
  margin-bottom: 30px;
}

/* Admin: plain and functional, same palette */
.admin-shell {
  max-width: 1200px;
  margin: auto;
  padding: 40px 5% 80px;
}

.admin-shell nav.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 14px;
  margin-bottom: 36px;
  font-size: 14px;
  font-weight: 700;
}

.admin-shell .stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 20px 0 0;
}

.admin-shell .stat {
  border: 1px solid var(--line);
  background: #f3ecdb;
  padding: 18px 22px;
  min-width: 170px;
}

.admin-shell .stat strong {
  display: block;
  font-family: 'Barlow Condensed', Impact, sans-serif;
  font-size: 40px;
  line-height: 1;
}

.admin-shell .stat span {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.inline-form {
  display: inline;
}

/* Responsive */
@media (max-width: 1000px) {
  .product-layout,
  .product-sections {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .product-buy {
    position: static;
  }

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

@media (max-width: 760px) {
  .page {
    padding: 44px 16px 70px;
  }

  .flash-wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  .flash {
    margin-inline: 16px;
  }

  .account-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .account-nav {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 16px;
  }

  .plugin-card {
    grid-template-columns: 1fr;
  }

  .promo {
    padding: 40px 16px;
  }

  .promo .inline {
    flex-direction: column;
  }

  .admin-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .product-buy {
    padding: 26px 22px;
  }

  .product-buy h2 {
    font-size: 46px;
  }
}

/* Share row on plugin pages */
.share {
  margin-top: 60px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.share-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: var(--muted);
  margin: 0 0 12px;
  text-transform: uppercase;
}

.share-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.share-link {
  display: inline-block;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  padding: 10px 14px;
  cursor: pointer;
}

.share-link:hover,
.share-link:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

.share-status {
  font-size: 13px;
  color: var(--muted);
  min-height: 1.4em;
  margin: 10px 0 0;
}

/* Utilities */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Honeypot field: present for bots, invisible for people. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Mobile fit: the header carries four links, and the hero columns must not push the page wider than the screen. */
@media (max-width: 760px) {
  header {
    padding: 0 16px;
  }

  nav {
    gap: 12px;
  }

  nav a {
    font-size: 11px;
    white-space: nowrap;
  }

  .hero,
  .hero > * {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
}

@media (max-width: 520px) {
  /* "Our approach" stays one scroll away on small phones, so the header keeps the plugins and login links. */
  .nav-optional {
    display: none;
  }
}

@media (max-width: 400px) {
  .hero h1 {
    font-size: 60px;
  }
}
