/* ─────────────────────────────────────────────────────────────────────────
   ClearShip — Shared stylesheet
   ───────────────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:        #1B2B4B;
  --navy-light:  #243660;
  --navy-dark:   #111d33;
  --white:       #ffffff;
  --off-white:   #f5f7fa;
  --border:      #dde3ed;
  --text:        #2c3e50;
  --text-muted:  #6b7a99;
  --accent:      #2e6fce;
  --accent-hover:#2460b5;
  --coral:       #E8633A;
  --coral-hover: #d4522b;
  --success-bg:  #eef6ff;
  --warning:     #f59e0b;
  --error-red:   #b91c1c;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--off-white);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Sticky Navbar ─────────────────────────────────────────────────────── */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-mark {
  width: 38px;
  height: 38px;
  background: var(--white);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-mark svg {
  width: 22px;
  height: 22px;
  fill: var(--navy);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-text .logo-name {
  font-size: 3.1rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}


.logo-text .logo-tagline {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 3px;
}

.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255,255,255,0.1);
  color: var(--white);
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255,255,255,0.1);
  color: var(--white);
}

.nav-user-email {
  color: rgba(255,255,255,0.72);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.nav-logout-btn {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.35);
  color: rgba(255,255,255,0.72);
  font-size: 0.88rem;
  font-weight: 500;
  font-family: inherit;
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.nav-logout-btn:hover {
  background: rgba(255,255,255,0.1);
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}

.nav-signup-link {
  background: var(--coral);
  color: var(--white) !important;
  border-radius: 6px;
  padding: 0.45rem 0.85rem;
}

.nav-signup-link:hover {
  background: var(--coral-hover) !important;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  margin-left: auto;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: rgba(255,255,255,0.8);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ── Footer ────────────────────────────────────────────────────────────── */

.site-footer {
  background: var(--navy-dark);
  padding: 2rem 2rem;
  margin-top: auto;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: start;
}

.footer-left {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.5;
}

.footer-centre {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1rem;
}

.footer-centre a {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}

.footer-centre a:hover { color: rgba(255,255,255,0.8); }

.footer-right {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  line-height: 1.5;
  text-align: right;
}

/* ── Page wrapper ──────────────────────────────────────────────────────── */

main { flex: 1; }

/* ── Card ──────────────────────────────────────────────────────────────── */

.card {
  background: var(--white);
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(27,43,75,0.07);
  padding: 2rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title svg {
  width: 18px;
  height: 18px;
  fill: var(--accent);
  flex-shrink: 0;
}

/* ── Form ──────────────────────────────────────────────────────────────── */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field.full { grid-column: 1 / -1; }

label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input, select {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(46,111,206,0.12);
}

input.invalid, select.invalid {
  border-color: var(--error-red);
  box-shadow: 0 0 0 3px rgba(185,28,28,0.1);
}

.field-error {
  font-size: 0.78rem;
  color: var(--error-red);
  display: none;
  margin-top: -0.1rem;
}

.input-wrap { position: relative; }

.input-prefix {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  color: var(--text-muted);
  pointer-events: none;
}

.input-suffix {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  color: var(--text-muted);
  pointer-events: none;
}

.has-prefix input { padding-left: 2rem; }
.has-suffix input { padding-right: 2.5rem; }

.select-wrap { position: relative; }

.select-wrap::after {
  content: '';
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--text-muted);
  pointer-events: none;
}

/* ── Buttons ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.1s;
  letter-spacing: 0.2px;
}

.btn:active { transform: scale(0.99); }

.btn-navy {
  background: var(--navy);
  color: var(--white);
}
.btn-navy:hover { background: var(--navy-light); }

.btn-coral {
  background: var(--coral);
  color: var(--white);
}
.btn-coral:hover { background: var(--coral-hover); }

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}
.btn-outline:hover { background: var(--navy); color: var(--white); }

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.5);
}
.btn-outline-white:hover { background: rgba(255,255,255,0.1); border-color: var(--white); }

.btn-calculate {
  margin-top: 1.75rem;
  width: 100%;
  padding: 0.85rem;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.2px;
  transition: background 0.15s, transform 0.1s;
}

.btn-calculate:hover { background: var(--navy-light); }
.btn-calculate:active { transform: scale(0.99); }

.btn-calculate:disabled {
  background: #9aa5bb;
  cursor: not-allowed;
  transform: none;
}

/* ── Results ───────────────────────────────────────────────────────────── */

#results { margin-top: 1.75rem; display: none; }

.results-card {
  background: var(--success-bg);
  border: 1.5px solid #c4dcf7;
  border-radius: 12px;
  padding: 1.5rem;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.results-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.placeholder-badge {
  font-size: 0.7rem;
  background: var(--warning);
  color: var(--white);
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.result-destination {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.cost-breakdown { display: flex; flex-direction: column; gap: 0.5rem; }

.cost-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  padding: 0.3rem 0;
}

.cost-row.divider {
  border-top: 1px solid #c4dcf7;
  margin-top: 0.25rem;
  padding-top: 0.75rem;
}

.cost-row.total { font-weight: 700; font-size: 1.05rem; color: var(--navy); }

.cost-label { color: var(--text-muted); }
.cost-value { font-weight: 500; color: var(--text); }
.cost-row.total .cost-value { color: var(--navy); }

.btn-ship-wrap { margin-top: 1.25rem; }

.btn-ship {
  display: block;
  width: 100%;
  padding: 0.9rem;
  background: var(--coral);
  color: var(--white);
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: background 0.15s, transform 0.1s;
}

.btn-ship:hover { background: var(--coral-hover); }
.btn-ship:active { transform: scale(0.99); }

.disclaimer {
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: 6px;
  font-size: 0.75rem;
  color: #92400e;
  line-height: 1.5;
}

/* ── Error message ─────────────────────────────────────────────────────── */

.error-msg {
  background: #fff0f0;
  border: 1.5px solid #fca5a5;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  color: var(--error-red);
  font-size: 0.875rem;
}

/* ── Regulated product warning ────────────────────────────────────────── */

.regulated-warning {
  background: #fff8ec;
  border: 1.5px solid rgba(245,158,11,0.45);
  border-radius: 12px;
  padding: 1.75rem 1.5rem;
  text-align: center;
}

.regulated-warning .warning-icon {
  font-size: 2.25rem;
  margin-bottom: 0.85rem;
}

.regulated-warning p {
  font-size: 0.9rem;
  color: #92400e;
  line-height: 1.75;
  max-width: 520px;
  margin: 0 auto;
}

/* ── Claude results sections ───────────────────────────────────────────── */

.results-card-v2 {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.result-section {
  border-radius: 9px;
  padding: 1.25rem 1.35rem;
}

.result-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 0.65rem;
}

/* Cost breakdown — light blue */
.result-cost {
  background: #eef6ff;
  border: 1px solid #c4dcf7;
}

.result-cost .result-section-label { color: var(--accent); }

.result-cost-text {
  font-size: 1.05rem;
  color: var(--navy);
  line-height: 1.65;
}

.cost-line {
  padding: 0.15rem 0;
}

/* What this means — light grey */
.result-means {
  background: #f8f9fa;
  border: 1px solid var(--border);
}

.result-means .result-section-label { color: var(--text-muted); }

.result-means p,
.result-means-body p {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.75;
  margin: 0 0 0.5rem;
}

.result-means-body p:last-child {
  margin-bottom: 0;
}

/* Our recommendation — navy */
.result-rec {
  background: var(--navy);
  border: 1px solid var(--navy-dark);
}

.result-rec .result-section-label { color: rgba(255,255,255,0.5); }

.result-rec p,
.result-rec-body p {
  font-size: 0.95rem;
  color: var(--white);
  line-height: 1.65;
  margin: 0 0 0.5rem;
}

.result-rec-body p:last-child {
  margin-bottom: 0;
}

/* ── Tier banners ──────────────────────────────────────────────────────── */

.tier-banner {
  margin-top: 1rem;
  padding: 0.8rem 1.1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.tier-banner a {
  font-weight: 600;
  text-decoration: underline;
  white-space: nowrap;
}

.tier-banner-soft {
  background: #fff8ec;
  border: 1px solid rgba(245,158,11,0.35);
  color: #92400e;
}

.tier-banner-soft a { color: #b45309; }

/* ── Modals ────────────────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17,29,51,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 1.5rem;
  opacity: 1;
  transition: opacity 0.15s;
}

.modal-overlay[aria-hidden="true"] {
  display: none;
}

.modal-box {
  background: var(--white);
  border-radius: 16px;
  padding: 2rem 2rem 1.75rem;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0,0,0,0.3);
}

.modal-box h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.modal-box .modal-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.modal-actions .btn {
  width: 100%;
  padding: 0.85rem;
  font-size: 0.95rem;
}

.modal-form { margin-bottom: 1.25rem; }
.modal-form .field { margin-bottom: 1rem; }
.modal-form .field:last-child { margin-bottom: 0; }

.modal-footnote {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

.modal-footnote a { color: var(--accent); text-decoration: none; }

/* ── Pro badge ─────────────────────────────────────────────────────────── */

.nav-pro-badge {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: #f59e0b;
  color: var(--white);
  padding: 3px 8px;
  border-radius: 20px;
  margin-left: 0.6rem;
  vertical-align: middle;
}

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0; right: 0;
    background: var(--navy);
    padding: 1rem 1.5rem 1.5rem;
    gap: 0.25rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  }
  .nav-toggle { display: flex; }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-right { text-align: center; }
}

@media (max-width: 520px) {
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: 1; }
  .card { padding: 1.25rem; }
}
/* ── Dimensions row ───────────────────────────────────────────── */
.dimensions-row {
  display: flex;
  gap: 0.75rem;
}

.dimension-input {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dimension-input .input-wrap {
  width: 100%;
  min-width: 0;
}

.dimension-input input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding-right: 1.8rem;
}

.dimension-input .input-suffix {
  font-size: 0.7rem;
  right: 0.5rem;
}

.dimension-label {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.25rem;
  text-align: center;
}

.helper-text {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.5rem;
  display: block;
}

@media (max-width: 480px) {
  .dimensions-row {
    flex-direction: column;
  }
}

a.logo .logo-clear {
  color: var(--white) !important;
  font-weight: 700;
}

a.logo .logo-ship {
  color: var(--white) !important;
  font-weight: 700;
}

a.logo:hover .logo-clear { color: var(--white) !important; }
a.logo:hover .logo-ship { color: var(--white) !important; }

/* ── How it works ──────────────────────────────────────────────────────── */

.how-it-works {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 3rem 2rem;
}

.hiw-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.hiw-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 1.5rem;
}

.hiw-step-number {
  width: 28px;
  height: 28px;
  background: var(--navy);
  color: var(--white);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
  flex-shrink: 0;
}

.hiw-icon {
  font-size: 1.85rem;
  margin-bottom: 0.85rem;
  line-height: 1;
}

.hiw-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.hiw-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.hiw-chevron {
  flex-shrink: 0;
  font-size: 1.5rem;
  color: var(--border);
  align-self: center;
  margin-top: -1rem;
  line-height: 1;
}

@media (max-width: 600px) {
  .hiw-inner {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }
  .hiw-step { padding: 1.25rem 0; }
  .hiw-chevron {
    transform: rotate(90deg);
    margin: 0;
  }
}

/* ── Hero split layout ─────────────────────────────────────────────────── */

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 3rem;
}

.hero-text {
  flex: 0 0 52%;
  text-align: left;
}

.hero-text h1 { margin-left: 0; margin-right: 0; }
.hero-text .hero-sub { margin-left: 0; margin-right: 0; }
.hero-text .trust-bar { justify-content: flex-start; }

/* ── Browser mockup ────────────────────────────────────────────────────── */

.hero-mockup-wrap {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.browser-mockup {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.12);
  overflow: hidden;
  width: 100%;
  max-width: 580px;
}

.browser-chrome {
  background: #e8eaed;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.browser-dots {
  display: flex;
  gap: 7px;
  flex-shrink: 0;
}

.browser-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
}

.browser-dot-red    { background: #ff5f57; }
.browser-dot-yellow { background: #febc2e; }
.browser-dot-green  { background: #28c840; }

.browser-url {
  flex: 1;
  background: #fff;
  border-radius: 5px;
  padding: 0.3rem 0.9rem;
  font-size: 1rem;
  color: #5f6368;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.browser-body {
  padding: 1.4rem;
  background: #f5f7fa;
}

.mock-result-card {
  background: #eef6ff;
  border: 1px solid #c4dcf7;
  border-radius: 10px;
  padding: 1.4rem 1.6rem;
}

.mock-result-label {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent);
  margin-bottom: 0.95rem;
  white-space: nowrap;
}

.mock-cost-line {
  font-size: 1.2rem;
  color: var(--navy);
  padding: 0.2rem 0;
  line-height: 1.6;
}

.mock-cost-total {
  border-top: 1px solid #c4dcf7;
  margin-top: 0.65rem;
  padding-top: 0.7rem;
  font-weight: 700;
  font-size: 1.25rem;
}

@media (max-width: 768px) {
  .hero-inner { flex-direction: column; gap: 0; }
  .hero-text {
    flex: 1;
    text-align: center;
  }
  .hero-text h1 { margin-left: auto; margin-right: auto; }
  .hero-text .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-text .trust-bar { justify-content: center; }
  .hero-mockup-wrap { display: none; }
}