/*
Theme Name: Synthpost
Theme URI: https://www.synthpost.io
Description: Synthpost's public website (SP-376 WEB-01): a light block theme in the application's colours (tokens from article-app/frontend/src/index.css). Header, footer, prices and the language switch come from small shortcodes in inc/ so they work with Polylang without a page builder.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.1
License: Proprietary
Text Domain: synthpost
*/

/* Most styling lives in theme.json; this file holds what theme.json cannot express. */

.sp-header { position: sticky; top: 0; z-index: 50; background: rgb(255 255 255 / .92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--wp--preset--color--border); }
.sp-header__inner { max-width: var(--wp--style--global--wide-size); margin: 0 auto; padding: .75rem 1.25rem; display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.sp-brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.15rem; color: var(--wp--preset--color--text); text-decoration: none; letter-spacing: .01em; }
.sp-brand img { width: 26px; height: 26px; }
.sp-nav { display: flex; gap: 1.1rem; flex-wrap: wrap; margin-right: auto; }
.sp-nav a { color: var(--wp--preset--color--muted); text-decoration: none; font-weight: 500; }
.sp-nav a:hover, .sp-nav a[aria-current="page"] { color: var(--wp--preset--color--primary); }
.sp-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.sp-lang { display: inline-flex; gap: .35rem; font-size: .9rem; }
.sp-lang a { color: var(--wp--preset--color--muted); text-decoration: none; padding: .15rem .35rem; border-radius: 4px; }
.sp-lang a[aria-current="true"] { background: var(--wp--preset--color--primary-soft); color: var(--wp--preset--color--primary-hover); font-weight: 600; }

.sp-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: .5rem 1rem; border-radius: 8px; font-weight: 600; text-decoration: none; border: 1px solid transparent; }
.sp-btn--primary { background: var(--wp--preset--color--primary); color: #fff; }
.sp-btn--primary:hover { background: var(--wp--preset--color--primary-hover); color: #fff; }
.sp-btn--ghost { color: var(--wp--preset--color--text); border-color: var(--wp--preset--color--border); background: #fff; }
.sp-btn--ghost:hover { border-color: var(--wp--preset--color--primary); color: var(--wp--preset--color--primary); }

.sp-footer { background: var(--wp--preset--color--side); color: #CBD5E1; margin-top: 4rem; }
.sp-footer__inner { max-width: var(--wp--style--global--wide-size); margin: 0 auto; padding: 2.5rem 1.25rem; display: flex; gap: 2rem; flex-wrap: wrap; justify-content: space-between; }
.sp-footer a { color: #CBD5E1; text-decoration: none; }
.sp-footer a:hover { color: #FDBA74; }
.sp-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.sp-footer small { color: #94A3B8; }

.sp-hero { padding: 4rem 0 2rem; }
.sp-cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.sp-card { background: #fff; border: 1px solid var(--wp--preset--color--border); border-radius: 12px; padding: 1.25rem; }
.sp-card h3 { margin-top: 0; font-size: 1.1rem; }

.sp-prices { width: 100%; border-collapse: collapse; font-size: .95rem; background: #fff; }
.sp-prices th, .sp-prices td { padding: .55rem .6rem; border-bottom: 1px solid var(--wp--preset--color--border); text-align: left; vertical-align: top; }
.sp-prices td.num, .sp-prices th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sp-prices thead th { background: var(--wp--preset--color--sunken); font-weight: 600; }
.sp-table-wrap { overflow-x: auto; border: 1px solid var(--wp--preset--color--border); border-radius: 12px; }
.sp-fee { font-size: 2.4rem; font-weight: 700; color: var(--wp--preset--color--text); }
.sp-note { color: var(--wp--preset--color--muted); font-size: .9rem; }

:focus-visible { outline: 2px solid #1D4ED8; outline-offset: 2px; }
@media (max-width: 720px) { .sp-nav { order: 3; width: 100%; } }

/* Layout fixes (2026-11-15 review): full-width header/footer, gutters on main, wide cards and price table. */
main.wp-block-group { padding-left: 1.25rem; padding-right: 1.25rem; }
.wp-site-blocks > header, .wp-site-blocks > footer { margin-block-start: 0; }
.has-large-font-size { line-height: 1.45; }
.sp-wide { width: min(1180px, calc(100vw - 2.5rem)); max-width: none !important; margin-left: 50% !important; transform: translateX(-50%); }
.sp-cards { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.sp-prices td:nth-child(2) { white-space: nowrap; }
.sp-prices .sp-model { color: var(--wp--preset--color--muted); font-size: .85rem; }
@media (max-width: 720px) { .sp-prices td:nth-child(2) { white-space: normal; } }
@media (max-width: 600px) { .has-large-font-size { font-size: 1.15rem !important; } }

/* Examples and services (2026-11-15): real renders of the app in phone-like frames; service sections with a picture. */
.sp-ex-strip { display: flex; gap: .75rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .5rem; }
.sp-ex-strip figure { flex: 0 0 min(300px, 78vw); margin: 0; scroll-snap-align: start; }
.sp-ex-strip img, .sp-ex-tall img, .sp-ex-phone img { display: block; width: 100%; height: auto; border-radius: 10px; }
.sp-ex-strip figcaption { color: var(--wp--preset--color--muted); font-size: .8rem; margin-top: .3rem; text-align: center; }
.sp-ex-phone { max-width: 360px; background: #fff; border: 1px solid var(--wp--preset--color--border); border-radius: 18px; padding: .75rem; box-shadow: 0 6px 24px rgba(15,23,42,.08); }
.sp-ex-ig__head { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; font-size: .9rem; }
.sp-ex-ig__head small { color: var(--wp--preset--color--muted); margin-left: auto; }
.sp-ex-avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #F97316, #C2410C); flex: none; }
.sp-ex-ig__cap { font-size: .88rem; line-height: 1.45; margin: .6rem 0 0; }
.sp-ex-tags { color: #1D4ED8; }
.sp-ex-thread p { font-size: .98rem; line-height: 1.5; margin: 0 0 .75rem; }
.sp-ex-thread__acts { color: var(--wp--preset--color--muted); font-size: .95rem; }
.sp-ex-tall { position: relative; max-width: 260px; border-radius: 18px; overflow: hidden; box-shadow: 0 6px 24px rgba(15,23,42,.12); background: #000; }
.sp-ex-video img { aspect-ratio: 9 / 16; object-fit: cover; border-radius: 0; }
.sp-ex-video__hook { position: absolute; top: 12%; left: 8%; right: 8%; text-align: center; color: #fff; font-weight: 800; font-size: 1.15rem; text-transform: uppercase; text-shadow: 0 2px 8px rgba(0,0,0,.7); }
.sp-ex-video__sub { position: absolute; bottom: 14%; left: 8%; right: 8%; text-align: center; color: #fff; font-weight: 700; font-size: .95rem; background: rgba(0,0,0,.55); padding: .35rem .5rem; border-radius: 6px; }
.sp-ex-video__bar { position: absolute; bottom: 4%; left: 8%; right: 8%; height: 3px; background: rgba(255,255,255,.35); border-radius: 2px; }
.sp-ex-video__bar i { display: block; width: 38%; height: 100%; background: #F97316; border-radius: 2px; }
.sp-ex-article { display: grid; grid-template-columns: minmax(0, 220px) 1fr; gap: 1rem; background: #fff; border: 1px solid var(--wp--preset--color--border); border-radius: 12px; padding: 1rem; }
.sp-ex-article__img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.sp-ex-article h3 { margin: .25rem 0 .5rem; font-size: 1.2rem; }
.sp-ex-article small { color: var(--wp--preset--color--muted); }
.sp-ex-chips span { display: inline-block; font-size: .75rem; font-weight: 600; padding: .1rem .4rem; margin: .1rem; border: 1px solid var(--wp--preset--color--border); border-radius: 6px; }
.sp-ex-chips span.on { background: #FFF7ED; border-color: #F97316; color: #C2410C; }
.sp-ex-row { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; }
.sp-ex-row h3 { margin-top: 0; }
.sp-service { display: grid; gap: 1.5rem; grid-template-columns: 1fr minmax(0, 300px); align-items: center; padding: 1.5rem 0; border-top: 1px solid var(--wp--preset--color--border); }
.sp-service h2 { margin-top: 0; }
.sp-service ul { padding-left: 1.2rem; }
.sp-badge { display: inline-block; font-size: .75rem; font-weight: 600; color: #C2410C; background: #FFF7ED; border-radius: 999px; padding: .15rem .6rem; margin-bottom: .4rem; }
@media (max-width: 720px) { .sp-service, .sp-ex-article { grid-template-columns: 1fr; } .sp-ex-article__img { max-height: 200px; } }
.sp-ex-phone, .sp-ex-article, .sp-ex-tall { box-sizing: border-box; max-width: 100%; }
.sp-ex-phone { width: 360px; } .sp-ex-tall { width: 260px; }
.sp-service .sp-ex-article { grid-template-columns: 1fr; }
.sp-service .sp-ex-article__img { max-height: 180px; }

/* Responsive (2026-11-15): phone menu, stacked price rows, no sideways overflow, smaller headings. */
.sp-menu { display: flex; align-items: center; gap: 1.25rem; flex: 1; }
.sp-menu-btn { display: none; }
.sp-mobile-only { display: none !important; }
.sp-btn--sm { min-height: 36px; padding: .35rem .8rem; font-size: .9rem; }
.sp-cards { grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); }
.sp-ex-row { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
img { max-width: 100%; height: auto; }

@media (max-width: 1080px) {
  .sp-header__inner { flex-wrap: nowrap; gap: .5rem; padding: .6rem 1rem; }
  .sp-brand { margin-right: auto; }
  .sp-mobile-only { display: inline-flex !important; }
  .sp-desktop-only { display: none !important; }
  .sp-menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--wp--preset--color--border); border-radius: 8px; background: #fff; color: var(--wp--preset--color--text); cursor: pointer; padding: 0; }
  .sp-menu-btn path { transition: transform .2s, opacity .2s; transform-origin: 12px 12px; }
  .is-open .sp-menu-btn .l1 { transform: translateY(5px) rotate(45deg); }
  .is-open .sp-menu-btn .l2 { opacity: 0; }
  .is-open .sp-menu-btn .l3 { transform: translateY(-5px) rotate(-45deg); }
  .sp-menu { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: #fff; border-bottom: 1px solid var(--wp--preset--color--border); box-shadow: 0 12px 24px rgba(15,23,42,.08); padding: .5rem 1rem 1rem; max-height: calc(100vh - 60px); overflow-y: auto; }
  .is-open .sp-menu { display: flex; }
  .sp-nav { flex-direction: column; gap: 0; margin: 0; width: auto; order: 0; }
  .sp-nav a { display: block; padding: .8rem .25rem; border-bottom: 1px solid var(--wp--preset--color--border); font-size: 1.05rem; color: var(--wp--preset--color--text); }
  .sp-actions { justify-content: space-between; padding-top: .9rem; }
  .sp-lang a { padding: .4rem .6rem; font-size: 1rem; }
}

@media (max-width: 720px) {
  .sp-service, .sp-ex-article { grid-template-columns: minmax(0, 1fr); }
  .sp-service > div:last-child:empty { display: none; }
  .sp-ex-phone, .sp-ex-tall { margin-inline: auto; }
  .sp-jump { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: .4rem; padding-bottom: .4rem; scrollbar-width: none; }
  .sp-jump .sp-btn { flex: none; min-height: 34px; padding: .3rem .75rem; font-size: .9rem; }
  /* Price list: one card per row, each value with its column name. */
  .sp-table-wrap { border: 0; overflow: visible; }
  .sp-prices, .sp-prices tbody, .sp-prices tr, .sp-prices td { display: block; width: 100%; box-sizing: border-box; }
  .sp-prices { background: transparent; }
  .sp-prices thead { display: none; }
  .sp-prices tr { background: #fff; border: 1px solid var(--wp--preset--color--border); border-radius: 12px; padding: .75rem 1rem; margin-bottom: .75rem; }
  .sp-prices td { border: 0; padding: .15rem 0; white-space: normal !important; }
  .sp-prices td.sp-c-service { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--wp--preset--color--primary); }
  .sp-prices td.sp-c-model { font-weight: 600; padding-bottom: .4rem; }
  .sp-prices td[data-label] { display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
  .sp-prices td[data-label]::before { content: attr(data-label); color: var(--wp--preset--color--muted); text-align: left; font-weight: 400; }
  .sp-prices td.sp-c-total { border-top: 1px solid var(--wp--preset--color--border); margin-top: .35rem; padding-top: .45rem; }
}

@media (max-width: 600px) {
  h1, .wp-block-post-title { font-size: 2rem !important; line-height: 1.15; }
  h2 { font-size: 1.5rem !important; line-height: 1.2; }
  h3 { font-size: 1.15rem !important; }
  .sp-hero { padding: 2rem 0 1rem; }
  .sp-fee { font-size: 2rem; }
  .sp-footer__inner { gap: 1.5rem; }
}
[id] { scroll-margin-top: 80px; }
.sp-ex-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.sp-ex-grid figure, .sp-ex-pod figure { margin: 0; }
.sp-ex-grid img, .sp-ex-pod img { display: block; width: 100%; height: auto; border-radius: 10px; }
.sp-ex-grid figcaption, .sp-ex-pod figcaption { color: var(--wp--preset--color--muted); font-size: .85rem; margin-top: .35rem; }
.sp-ex-pod { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 720px) { .sp-ex-pod { grid-template-columns: minmax(0, 1fr); } .sp-ex-pod .tall { max-width: 240px; } }
.sp-specs { width: 100%; border-collapse: collapse; background: #fff; font-size: .95rem; }
.sp-specs th, .sp-specs td { text-align: left; vertical-align: top; padding: .55rem .7rem; border-bottom: 1px solid var(--wp--preset--color--border); }
.sp-specs th { width: 34%; font-weight: 600; }
@media (max-width: 600px) { .sp-specs th, .sp-specs td { display: block; width: auto; border: 0; padding: .2rem 0; } .sp-specs tr { display: block; padding: .6rem 0; border-bottom: 1px solid var(--wp--preset--color--border); } }
@media (max-width: 600px) { .sp-ex-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; } .sp-ex-grid figcaption { font-size: .75rem; } }
