/*
 * Shared, stable styles for the Poddin site.
 *
 * Structure and interaction live in Naki UI components. This file holds only what
 * typed styles cannot express in client mode: hover states, auto-fit grids,
 * responsive type and the link-as-button classes.
 */

/* Self-hosted so the files can be preloaded from the page's HTML (see tool/generate_page_html.dart).
   Latin subset only. Plex Sans is one variable file covering 400-600. */
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-serif-400-latin.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Serif";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/ibm-plex-serif-500-latin.woff2") format("woff2");
}

:root {
  --burgundy: #6b2433;
  --crimson: #d91e52;
  --crimson-hover: #b8183f;
  --rose: #c23a6a;
  --ink: #1f1a1c;
  --body: #4a4246;
  --nav: #3d3539;
  --muted: #5e5559;
  --line: #e4ddda;
  --subtle: #f4f0ee;
  --ground: #fbf9f8;
  --serif: "IBM Plex Serif", Georgia, serif;
}

html,
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

/* Layout */
.container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 40px;
  padding-right: 40px;
}

/* Auto-fit grid. Set --min (column minimum) and --gap inline where they differ. */
.grid {
  display: grid;
  gap: var(--gap, 20px);
  grid-template-columns: repeat(
    auto-fit,
    minmax(min(var(--min, 280px), 100%), 1fr)
  );

  & > * {
    min-width: 0;
  }
}

/* Typography */
.eyebrow {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--burgundy);
  font-weight: 600;
}
.eyebrow--muted {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
}
.eyebrow--light {
  color: #fff;
}

.h-display,
.h-hero,
.h-page,
.h-section,
.h-cta,
.h-product,
.h-feature {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  text-wrap: balance;
}
.h-page {
  font-size: 50px;
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.h-display {
  font-size: 52px;
  line-height: 1.08;
  letter-spacing: -0.015em;
}
.h-hero {
  font-size: 54px;
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.h-section {
  font-size: 42px;
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.h-cta {
  font-size: 38px;
  line-height: 1.15;
}
.h-feature {
  font-size: 24px;
  line-height: 1.2;
}
.h-title {
  font-size: 22px;
  line-height: 1.2;
  text-wrap: balance;
}

.lead {
  font-size: 19px;
  line-height: 1.6;
  color: var(--body);
  text-wrap: balance;
  margin: 0;
}

.copy {
  font-size: 17px;
  line-height: 1.7;
  color: var(--body);
  text-wrap: balance;
  margin: 0;
}

.small {
  font-size: 15px;
  color: var(--body);
  margin: 0;
}

@media (max-width: 640px) {
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }
  .h-display,
  .h-hero {
    font-size: 36px;
    line-height: 1.12;
    letter-spacing: -0.01em;
  }
  .h-section {
    font-size: 28px;
    line-height: 1.18;
  }
  .h-cta {
    font-size: 30px;
  }
  .h-feature {
    font-size: 22px;
  }
  .lead {
    font-size: 17px;
  }
  .copy {
    font-size: 16px;
  }
}

/* Links styled as buttons. Use Naki Button only for actions. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 42px;
  padding: 0 26px;
  border-radius: 8px;
  font-weight: 500;
  line-height: 1.55;
  cursor: pointer;
}
.btn--sm {
  min-height: 40px;
  padding: 0 22px;
  font-size: 15px;
}
.btn--primary {
  background: var(--crimson);
  color: #fff;
}
.btn--primary:hover {
  background: var(--crimson-hover);
}
.btn--light {
  background: #fff;
  color: var(--burgundy);
  font-weight: 600;
  padding: 0 28px;
}
.btn--light:hover {
  background: var(--subtle);
}
.btn:focus-visible,
.lnk:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid var(--burgundy);
  outline-offset: 2px;
}

.lnk {
  color: var(--burgundy);
  font-weight: 500;
}
.lnk:hover {
  text-decoration: underline;
}
.nav-link:hover {
  color: var(--burgundy);
}
.active {
  color: var(--burgundy);
}

/* Surfaces */
.card {
  background: #fff;
  border: 1px solid var(--line);
}
.row-hover:hover {
  background: var(--subtle);
}
.press-card:hover {
  border-color: var(--burgundy);
}

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

/* Page structure */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
}
.page-main {
  flex: 1;
}
html {
  scroll-behavior: smooth;
}

.band {
  background: var(--ground);
}
.band--subtle {
  background: var(--subtle);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.band--white {
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.band--rose {
  background: var(--rose);
  color: #fff;
}
.band--plain {
  border: 0;
}
.band-inner {
  padding-top: var(--band-pt, 96px);
  padding-bottom: var(--band-pb, 96px);
}
@media (max-width: 640px) {
  .band-inner {
    padding-top: calc(var(--band-pt, 96px) * 0.58);
    padding-bottom: calc(var(--band-pb, 96px) * 0.58);
  }
}

/* Header */
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 5px;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  color: var(--nav);
  font-size: 15px;
  font-weight: 500;
}
.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 24px 20px;
}
.drawer-link {
  padding: 12px 4px;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.drawer-nav .btn {
  margin-top: 20px;
}
@media (max-width: 640px) {
  .header-row {
    padding-top: 10px;
    padding-bottom: 10px;
    flex-wrap: nowrap;
  }
}

/* Footer */
.site-footer {
  background: var(--ground);
}
.footer-top {
  display: grid;
  gap: 40px;
  padding-top: 64px;
  padding-bottom: 40px;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
}
.footer-about {
  display: flex;
  flex-direction: column;
  gap: 14px;
  grid-column: span 2;
  min-width: 0;
}
.footer-summary {
  margin: 0;
  color: var(--body);
  font-size: 14px;
  max-width: 360px;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
}
.footer-link {
  color: var(--body);
}
.footer-muted {
  color: var(--body);
}
.footer-legal {
  padding-bottom: 48px;
}
.footer-legal-line {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  color: var(--muted);
  font-size: 13px;
}
@media (max-width: 640px) {
  .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 40px;
    gap: 28px 24px;
  }
  .footer-about {
    grid-column: span 2;
  }
}

/* ResponsiveBuilder wraps each slot in a span; let the desktop slot take the row. */
.header-row > .br-lg,
.header-row > .br-xl {
  flex: 1;
}
.header-desktop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.header-desktop .site-nav {
  margin: 0 auto;
}

/* Cards and lists */
.h-sans {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
}
.fact-row {
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
}
.fact-row--first {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}
.fact-label {
  margin-bottom: 6px;
}
.fact-value {
  font-weight: 500;
}
.ruled-list {
  display: flex;
  flex-direction: column;
}
.ruled-row {
  display: flex;
  gap: 20px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.ruled-year {
  min-width: 96px;
  font-weight: 600;
  color: var(--burgundy);
}
@media (max-width: 640px) {
  .ruled-row {
    gap: 16px;
    padding: 11px 0;
    font-size: 15px;
  }
  .ruled-year {
    min-width: 76px;
  }
}

/* Media */
.backdrop {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--size, 420px);
  height: var(--size, 420px);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(var(--blur, 30px));
  opacity: var(--op, 0.5);
}
.backdrop--contain img {
  object-fit: contain;
}
.phone-shot {
  position: relative;
  align-self: flex-start;
}
.phone-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px 14px 0 0;
  box-shadow: 0 12px 28px rgba(31, 26, 28, 0.18);
}
.browser {
  position: relative;
  width: 100%;
  max-width: 420px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #cfc6c2;
  background: #fff;
  box-shadow: 0 12px 32px rgba(31, 26, 28, 0.14);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #e9e3e0;
  border-bottom: 1px solid #cfc6c2;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #c9c0bc;
  flex: none;
}
.browser-address {
  flex: 1;
  min-width: 0;
  background: #fff;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.browser img {
  display: block;
  width: 100%;
  height: auto;
}
.browser--compact .browser-bar {
  padding: 8px 10px;
  gap: 6px;
}
.browser--compact .dot {
  width: 7px;
  height: 7px;
}
.logo-tile {
  position: relative;
  box-shadow: 0 12px 28px rgba(31, 26, 28, 0.18);
}

/* Product rows */
.grid--center {
  align-items: center;
}
.h-product {
  font-size: 32px;
  line-height: 1.18;
  text-wrap: balance;
}
.text {
  font-size: 16px;
  line-height: 1.55;
  color: var(--body);
  text-wrap: balance;
  margin: 0;
}
.eyebrow--grey {
  color: var(--muted);
}
.app-screen {
  display: block;
  height: auto;
  box-shadow: 0 12px 32px rgba(31, 26, 28, 0.18);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  margin-top: 4px;
}
.list-label {
  margin-bottom: 14px;
}
@media (max-width: 640px) {
  .h-product {
    font-size: 26px;
  }
  .h-page {
    font-size: 36px;
    line-height: 1.12;
    letter-spacing: -0.01em;
  }
}

/* Leadership */
.portrait {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: #ece7e4;
  flex: none;
}
.portrait--round {
  border-radius: 999px;
  aspect-ratio: auto;
}
.portrait-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
}
.leader-body {
  padding: 0 8px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}
.leader-name {
  font-weight: 600;
  font-size: 20px;
}
.leader-role {
  color: var(--burgundy);
  font-weight: 500;
  font-size: 15px;
}
.leader-since {
  color: var(--muted);
  font-size: 14px;
  margin-top: 2px;
}
.leader-highlight {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  font-size: 14px;
  color: var(--nav);
}

/* Services list */
.grid--start {
  align-items: start;
}
.service-list {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid #cfc6c2;
}
.service-row {
  display: flex;
  gap: 20px;
  padding: 24px 16px;
  border-top: 1px solid #cfc6c2;
  align-items: flex-start;
}
.service-number {
  font-weight: 600;
  color: var(--burgundy);
  min-width: 28px;
}
.service-body {
  flex: 1;
  min-width: 0;
}
.service-title {
  font-weight: 600;
  font-size: 18px;
}
.service-blurb {
  color: var(--body);
  font-size: 15px;
  margin-top: 4px;
}
.service-arrow {
  color: var(--burgundy);
}

/* Press */
.press-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.press-tile {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  flex: none;
}
.press-body {
  padding: 18px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}
.press-outlet {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.2;
}
.press-read {
  margin-top: auto;
  color: var(--burgundy);
  font-weight: 500;
  font-size: 14px;
}
.contact-card {
  box-sizing: border-box;
}

/* About */
.band--gradient {
  background: linear-gradient(180deg, #f6dce5 0%, #fbeff3 55%, #ffffff 100%);
  border: 0;
}
.band--flat-top {
  border-top: 0;
}
.mission {
  margin: 0;
  max-width: 980px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 38px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.portrait--founder {
  max-width: 440px;
  aspect-ratio: 4 / 5;
  border-radius: 20px;
  border: 1px solid var(--line);
}
.portrait--round {
  width: 72px;
  height: 72px;
  aspect-ratio: auto;
  border-radius: 999px;
}
.founder-note {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  font-size: 15px;
  color: var(--nav);
}
@media (max-width: 640px) {
  .mission {
    font-size: 24px;
    line-height: 1.3;
  }
  .portrait--founder {
    max-width: none;
    border-radius: 18px;
  }
  .portrait--round {
    width: 64px;
    height: 64px;
  }
  .founder-note {
    font-size: 14px;
    padding-top: 16px;
  }
}

/* Call to action band */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
  justify-content: space-between;
}
.cta-title {
  max-width: 640px;
}
@media (max-width: 640px) {
  .cta-row {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }
  .cta-row .btn {
    width: 100%;
  }
}

/* Service examples */
.example-card {
  height: 100%;
  box-sizing: border-box;
}
.example-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.visual {
  position: relative;
  display: flex;
  justify-content: center;
  overflow: hidden;
  background: var(--subtle);
  flex: none;
}
.visual--center {
  align-items: center;
}
.visual--top {
  padding: 28px 28px 0;
  align-items: flex-start;
}
.visual--phones {
  gap: 14px;
}
.browser--flush {
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  align-self: flex-start;
}
.example-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.example-body .lnk {
  margin-top: auto;
}
.example-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.2;
}
.split {
  align-items: stretch;
}
.split-visual {
  position: relative;
  min-height: 340px;
  overflow: hidden;
  background: var(--subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}
.crm-mock {
  position: absolute;
  top: -12px;
  left: -12px;
  width: calc(100% + 24px);
  height: calc(100% + 24px);
  filter: blur(3px);
}
.crm-mock img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.split-visual .logo-tile {
  box-shadow: 0 18px 44px rgba(31, 26, 28, 0.24);
}
.split-body {
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
}
.split-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.2;
}
.bullet-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
  color: var(--nav);
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
@media (max-width: 640px) {
  .split-body {
    padding: 28px 22px;
  }
  .split-title {
    font-size: 24px;
  }
}

/* Facts card: roomy on desktop, tighter on phones (matches the phone board). */
.facts-card {
  padding: 32px;
}
@media (max-width: 640px) {
  .facts-card {
    padding: 22px;
  }
  .facts-card .fact-row {
    padding-top: 18px;
    margin-top: 18px;
  }
  .facts-card .fact-row--first {
    padding-top: 0;
    margin-top: 0;
  }
  .facts-card .fact-label {
    font-size: 11px;
    margin-bottom: 4px;
  }
}

/* Service hero: back link above the grid. Stretches the grid to the full container (like the About hero). */
.hero-stack {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.hero-stack > .lnk {
  align-self: flex-start;
}

/* Sticky header. Anchored sections stop just below it: PageMeta measures the header and sets --header-h. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
}
section[id] {
  scroll-margin-top: var(--header-h, 66px);
}

/* Frosted header: a translucent layer blurs 12px of whatever scrolls beneath it. The blur sits on a
   pseudo-element, not the header, because backdrop-filter on an ancestor would trap the menu drawer
   (position: fixed) inside the header's box. */
.site-header {
  background: transparent;
  border-bottom: 1px solid var(--line);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(251, 249, 248, 0.8);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  pointer-events: none;
}
