/* Italiano in Pratica — provisional brand. Buildless, no external assets. */

:root {
  --blue: #2458a6;
  --blue-dark: #1b4486;
  --navy: #12264a;
  --muted: #475871;
  --pale: #eef4fb;
  --pale-2: #f6f9fd;
  --rule: #d3deed;
  --white: #ffffff;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bar-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--white);
  color: var(--navy);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
}

h1, h2, h3 { font-family: var(--sans); font-weight: 650; line-height: 1.3; letter-spacing: normal; margin: 0; color: var(--navy); }
p { margin: 0 0 .75em; }
a { color: var(--blue); }
ul { margin: 0; padding: 0; }

main:focus { outline: none; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 3px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--navy); color: var(--white); padding: 10px 14px; border-radius: 0 0 6px 6px;
}
.skip:focus { top: 0; }

/* Preview banner */
.preview-banner { background: var(--navy); color: var(--white); font-size: .8125rem; line-height: 1.4; }
.preview-banner .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; padding-top: 6px; padding-bottom: 6px; }
.preview-banner p { margin: 0; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 16px; }
.wordmark { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; color: var(--navy); text-decoration: none; letter-spacing: .01em; }
.wordmark span { color: var(--blue); font-style: italic; font-weight: 400; }
.site-nav { display: flex; gap: 22px; }
.site-nav a { color: var(--navy); text-decoration: none; font-size: .9375rem; padding: 6px 0; }
.site-nav a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 4px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 48px; padding: 12px 22px; border-radius: 6px; border: 2px solid var(--blue);
  background: var(--blue); color: var(--white); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn-outline { background: var(--white); color: var(--blue); }
.btn-outline:hover { background: var(--pale); color: var(--blue-dark); }
.btn-block { width: 100%; }
.btn [data-money] { white-space: nowrap; flex-shrink: 0; }

/* Hero */
.hero { padding: 36px 0 28px; }
.hero .wrap { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; }
.eyebrow { font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); font-weight: 600; margin-bottom: 10px; }
.hero h1 { font-size: clamp(1.9rem, 5vw, 3rem); max-width: 18em; }
.hero .lead { font-size: 1.125rem; line-height: 1.7; color: var(--muted); max-width: 34em; margin: 20px 0 24px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.hero-actions .from { color: var(--muted); font-size: .9375rem; }
.hero-art { display: none; }

/* Workbook covers (decorative CSS illustration) */
.cover {
  position: relative; width: 150px; height: 200px; background: var(--white);
  border: 1px solid var(--navy); border-left: 12px solid var(--blue); border-radius: 3px 6px 6px 3px;
  padding: 16px 12px 12px; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 3px 4px 0 var(--rule);
}
.cover .c-brand { font-family: var(--serif); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); }
.cover .c-title { font-family: var(--serif); font-size: 1.35rem; line-height: 1.1; color: var(--navy); }
.cover .c-rule { height: 1px; background: var(--rule); margin: 8px 0; }
.cover .c-line { height: 4px; background: var(--pale); margin-top: 6px; border-radius: 2px; }
.cover .c-line.s { width: 60%; }
.cover .c-foot { font-size: .62rem; color: var(--muted); line-height: 1.3; }
.cover.is-complete { background: var(--pale); border-left-color: var(--navy); }
.cover.is-complete .c-line { background: var(--white); }
.cover.mini { width: 54px; height: 72px; padding: 8px 6px; border-left-width: 6px; box-shadow: 2px 2px 0 var(--rule); flex: none; }
.cover.mini > * { display: none; }
.cover.mini .c-line { display: block; }
.hero-art .stack { position: relative; height: 250px; max-width: 330px; margin-left: auto; }
.hero-art .cover { position: absolute; }
.hero-art .cover:nth-child(1) { left: 0; top: 36px; }
.hero-art .cover:nth-child(2) { left: 120px; top: 0; width: 170px; height: 226px; }

@media (min-width: 820px) {
  .hero { padding: 52px 0 40px; }
  .hero .wrap { grid-template-columns: 1.4fr .8fr; gap: 48px; }
  .hero-art { display: block; }
}

/* Sections */
section { scroll-margin-top: 12px; }
.section { padding: 44px 0; border-top: 1px solid var(--rule); }
.section-head { max-width: 40em; margin-bottom: 24px; }
.section-head h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); margin-bottom: 14px; }
.section-head p { color: var(--muted); margin: 0; }
.packages { padding: 12px 0 40px; border-top: 0; }

/* Package cards */
.cards { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: stretch; }
@media (min-width: 820px) { .cards { grid-template-columns: 1.14fr 1fr; gap: 24px; } }

.card { position: relative; display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--rule); border-radius: 8px; padding: 24px 22px 22px; }
.card-complete { border: 2px solid var(--blue); background: var(--pale-2); box-shadow: 0 6px 0 var(--pale); }
@media (min-width: 820px) { .card-complete { padding: 30px 28px 26px; } }
.card-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.card h3 { font-size: 1.5rem; }
.tag { display: inline-block; margin-top: 4px; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--white); background: var(--blue); padding: 2px 9px; border-radius: 3px; }
.card-sub { font-size: .875rem; color: var(--muted); }
.price { font-family: var(--sans); font-size: 2.6rem; line-height: 1.2; font-weight: 650; color: var(--navy); margin: 8px 0; }
.price-note { font-size: .875rem; color: var(--muted); margin: 0 0 6px; }
.price-line { font-size: .9375rem; margin: 0 0 10px; }
.price-line strong { color: var(--navy); }

.benefits { list-style: none; margin: 8px 0 14px; border-top: 1px solid var(--rule); }
.benefits li { position: relative; padding: 9px 0 9px 22px; border-bottom: 1px solid var(--rule); font-size: .9688rem; }
.benefits li::before { content: ""; position: absolute; left: 3px; top: 1.05em; width: 8px; height: 8px; background: var(--blue); border-radius: 50%; }

details.more { margin: 0 0 18px; }
details.more > summary, details.faq > summary { cursor: pointer; list-style: none; color: var(--blue); font-weight: 600; padding: 6px 0; }
details > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+ "; }
details.more[open] > summary::before { content: "− "; }
details.more ul { margin: 6px 0 0 18px; color: var(--navy); font-size: .9375rem; }
details.more li { margin-bottom: 3px; }
.card .btn-wrap { margin-top: auto; }

.status-note { margin-top: 22px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 6px; color: var(--muted); font-size: .875rem; }
.test-label { margin: 0 0 14px; padding: 8px 12px; border: 1px dashed var(--navy); border-radius: 6px; background: var(--pale); color: var(--navy); font-size: .875rem; }

/* Inventory */
details.inventory { border: 1px solid var(--rule); border-radius: 8px; padding: 4px 18px; }
details.inventory > summary { cursor: pointer; padding: 14px 0; font-weight: 600; color: var(--blue); }
.table-wrap { overflow-x: auto; padding-bottom: 14px; }
table { width: 100%; border-collapse: collapse; font-size: .9375rem; min-width: 440px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
thead th { border-bottom: 2px solid var(--navy); font-family: var(--serif); font-size: 1rem; }
td.n, th.n { text-align: center; white-space: nowrap; }

/* Audience / Delivery / FAQ */
.two-col { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 820px) { .two-col { grid-template-columns: 1fr 1.3fr; gap: 56px; } }
.checks { list-style: none; }
.checks li { padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: .9688rem; }
details.faq { border-bottom: 1px solid var(--rule); }
details.faq > summary { color: var(--navy); font-weight: 600; padding: 14px 28px 14px 0; position: relative; }
details.faq > summary::after { content: "+"; position: absolute; right: 4px; top: 12px; color: var(--blue); font-size: 1.25rem; }
details.faq[open] > summary::after { content: "−"; }
details.faq p { color: var(--muted); padding-right: 24px; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); background: var(--pale-2); padding: 34px 0 40px; font-size: .875rem; color: var(--muted); }
.site-footer .foot-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 820px) { .site-footer .foot-grid { grid-template-columns: 1.4fr 1fr; gap: 56px; } }
.foot-links { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.pending { color: var(--muted); cursor: not-allowed; }
.pending em { font-style: normal; font-size: .75rem; border: 1px solid var(--rule); border-radius: 3px; padding: 0 5px; margin-left: 4px; }

/* Mobile purchase bar */
.sticky-bar { display: none; }
@media (max-width: 819px) {
  body { padding-bottom: calc(var(--bar-h) + 24px + env(safe-area-inset-bottom, 0px)); }
  .sticky-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--white); border-top: 1px solid var(--navy);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  }
  .sticky-bar.is-hidden { display: none; }
  .sticky-bar .sb-text { line-height: 1.2; min-width: 0; }
  .sticky-bar .sb-name { font-size: .75rem; color: var(--muted); }
  .sticky-bar .sb-price { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }
  .sticky-bar .btn { min-height: 44px; padding: 8px 16px; white-space: nowrap; }
}
@media (max-width: 639px) { .site-nav { display: none; } }

/* Modals */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(18, 38, 74, .6);
  display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto;
}
.modal {
  position: relative; width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--white); border-radius: 8px; border-top: 4px solid var(--blue); padding: 26px 24px 22px;
}
.modal h2 { font-size: 1.5rem; padding-right: 36px; margin-bottom: 10px; }
.modal-close {
  position: absolute; top: 8px; right: 8px; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--white); color: var(--navy); border: 1px solid var(--rule); border-radius: 6px; font: inherit; font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.modal-close:hover { background: var(--pale); }
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-top: 14px; }
