/* ============================================================
   iPhone Repair Southport — shared stylesheet
   Palette: clean medical/technical (Option A)
   Built: April 2026
   ============================================================ */

/* --- Design tokens --- */
:root {
  --white: #151923;
  --off-white: #0A0E1A;
  --light-gray: #1E2332;
  --mid-gray: #2A3040;
  --border: #2A3040;
  --muted: #8E95A8;
  --text: #F5F5F7;
  --ios-blue: #0A84FF;
  --ios-blue-hover: #409CFF;
  --success-green: #30D158;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.35), 0 2px 4px rgba(0,0,0,0.25);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.5), 0 4px 8px rgba(0,0,0,0.3);
  --max-width: 1200px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
  background: var(--off-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ios-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--text); line-height: 1.2; margin: 0 0 16px; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }
p { margin: 0 0 16px; }

/* --- Accessibility --- */
.skip-link {
  position: absolute; top: -100px; left: 8px;
  background: var(--ios-blue); color: #FFFFFF;
  padding: 8px 16px; border-radius: var(--radius-sm);
  z-index: 1000; font-weight: 600;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 8px; text-decoration: none; }

/* --- Layout --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
section { padding: 64px 0; }
@media (min-width: 768px) { section { padding: 80px 0; } }

/* --- Navigation --- */
.site-nav {
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; max-width: var(--max-width); margin: 0 auto; }
.nav-brand { font-weight: 700; font-size: 1.125rem; color: var(--text); letter-spacing: -0.01em; }
.nav-brand:hover { text-decoration: none; }
.nav-links { display: none; list-style: none; gap: 28px; margin: 0; padding: 0; }
.nav-links a { color: var(--text); font-size: 0.9375rem; font-weight: 500; }
.nav-links a:hover { color: var(--ios-blue); text-decoration: none; }
.nav-toggle {
  display: block; background: none; border: 0; padding: 8px;
  cursor: pointer; color: var(--text); font-size: 1.5rem; line-height: 1;
}
.nav-toggle:focus-visible { outline: 2px solid var(--ios-blue); outline-offset: 2px; border-radius: var(--radius-sm); }
.nav-mobile {
  display: none;
  background: var(--white); border-top: 1px solid var(--border);
  padding: 16px 20px;
}
.nav-mobile[aria-hidden="false"] { display: block; }
.nav-mobile ul { list-style: none; margin: 0; padding: 0; }
.nav-mobile li { padding: 12px 0; border-bottom: 1px solid var(--mid-gray); }
.nav-mobile li:last-child { border-bottom: 0; }
.nav-mobile a { display: block; color: var(--text); font-weight: 500; }
@media (min-width: 820px) {
  .nav-links { display: flex; }
  .nav-toggle, .nav-mobile { display: none !important; }
}

/* --- Hero --- */
.hero {
  background: linear-gradient(180deg, var(--white) 0%, var(--off-white) 100%);
  padding: 64px 0 48px;
  text-align: center;
}
@media (min-width: 768px) { .hero { padding: 96px 0 72px; } }
.hero-eyebrow { color: var(--ios-blue); font-weight: 600; font-size: 0.9375rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.hero h1 { margin-bottom: 20px; max-width: 900px; margin-left: auto; margin-right: auto; }
.hero-sub { font-size: clamp(1.0625rem, 2vw, 1.25rem); color: var(--muted); max-width: 720px; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* --- Buttons --- */
.btn {
  display: inline-block; padding: 14px 28px; border-radius: 980px;
  font-weight: 600; font-size: 1rem; cursor: pointer;
  border: 0; transition: all 0.2s ease;
  text-align: center; line-height: 1; white-space: nowrap;
}
.btn-primary { background: var(--ios-blue); color: var(--white); }
.btn-primary:hover { background: var(--ios-blue-hover); text-decoration: none; transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--ios-blue); border: 1.5px solid var(--ios-blue); }
.btn-secondary:hover { background: var(--ios-blue); color: var(--white); text-decoration: none; }
.btn:focus-visible { outline: 3px solid rgba(0,122,255,0.3); outline-offset: 2px; }

/* --- Cards --- */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-md); }
.card h3 { margin-top: 0; }
.card-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 32px; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .card-grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* --- Image placeholder (for development — will be swapped for real photos later) --- */
.img-placeholder {
  background: linear-gradient(135deg, #1E2332 0%, #151923 100%);
  border: 2px dashed #3A4050;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  padding: 32px; text-align: center;
  color: var(--muted); font-size: 0.875rem; line-height: 1.5;
  min-height: 240px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.img-placeholder strong { display: block; color: var(--text); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.75rem; }

/* --- Pricing table --- */
.pricing-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 24px 0; border-radius: var(--radius-md); border: 1px solid var(--border); }
table.pricing {
  width: 100%; border-collapse: collapse; background: var(--white);
  min-width: 520px;
}
table.pricing th, table.pricing td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--mid-gray); }
table.pricing th { background: var(--light-gray); font-weight: 600; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
table.pricing tr:last-child td { border-bottom: 0; }
table.pricing td.price { font-weight: 600; color: var(--text); white-space: nowrap; }

/* --- FAQ accordion --- */
.faq { border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  display: block; width: 100%; background: none; border: 0;
  padding: 20px 44px 20px 0; text-align: left; cursor: pointer;
  font-size: 1.0625rem; font-weight: 600; color: var(--text);
  position: relative; font-family: var(--font);
}
.faq-q:focus-visible { outline: 2px solid var(--ios-blue); outline-offset: -2px; border-radius: var(--radius-sm); }
.faq-q::after {
  content: "+"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; color: var(--ios-blue); font-weight: 400; transition: transform 0.2s ease;
}
.faq-q[aria-expanded="true"]::after { content: "−"; }
.faq-a { display: none; padding: 0 0 20px; color: var(--muted); }
.faq-a[aria-hidden="false"] { display: block; }

/* --- Forms --- */
.form-field { margin-bottom: 20px; }
.form-field label { display: block; font-weight: 600; font-size: 0.9375rem; margin-bottom: 6px; color: var(--text); }
.form-field .hint { font-size: 0.8125rem; color: var(--muted); margin-top: 4px; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 12px 14px; font-size: 1rem; font-family: var(--font);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--white); color: var(--text); transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: 0; border-color: var(--ios-blue); box-shadow: 0 0 0 3px rgba(0,122,255,0.15);
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-status { margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-sm); display: none; }
.form-status.success { display: block; background: rgba(48, 209, 88, 0.12); color: #30D158; border: 1px solid rgba(48, 209, 88, 0.35); }
.form-status.error { display: block; background: rgba(255, 69, 58, 0.12); color: #FF6961; border: 1px solid rgba(255, 69, 58, 0.35); }

/* --- Callouts / badges --- */
.badge-success {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(48, 209, 88, 0.15); color: #30D158;
  padding: 6px 12px; border-radius: 980px;
  font-size: 0.875rem; font-weight: 600;
  border: 1px solid rgba(48, 209, 88, 0.3);
}
.badge-success::before { content: "✓"; font-weight: 700; }

.callout {
  background: var(--light-gray); border-left: 4px solid var(--ios-blue);
  padding: 20px 24px; border-radius: var(--radius-sm); margin: 24px 0;
}
.callout-success { background: rgba(48, 209, 88, 0.08); border-left-color: var(--success-green); }

/* --- Comparison table --- */
.compare-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 24px 0; border-radius: var(--radius-md); border: 1px solid var(--border); }
table.compare { width: 100%; border-collapse: collapse; background: var(--white); min-width: 560px; }
table.compare th, table.compare td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--mid-gray); vertical-align: top; }
table.compare th { background: var(--light-gray); font-weight: 600; }
table.compare tr:last-child td { border-bottom: 0; }
table.compare .yes { color: var(--success-green); font-weight: 700; }
table.compare .no { color: #D70015; font-weight: 700; }

/* --- Breadcrumbs --- */
.breadcrumbs { font-size: 0.875rem; color: var(--muted); padding: 16px 0 0; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--ios-blue); }
.breadcrumbs span[aria-current="page"] { color: var(--text); font-weight: 500; }

/* --- Footer --- */
.site-footer {
  background: var(--white); border-top: 1px solid var(--border);
  padding: 48px 0 32px; margin-top: 64px; font-size: 0.9375rem; color: var(--muted);
}
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-grid h4 { color: var(--text); font-size: 0.9375rem; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--muted); }
.footer-grid a:hover { color: var(--ios-blue); }
.footer-bottom {
  border-top: 1px solid var(--mid-gray); margin-top: 32px; padding-top: 20px;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-size: 0.8125rem;
}
.footer-built a { color: var(--ios-blue); font-weight: 600; }

/* --- Utility --- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-lg { margin-top: 48px; }
.mb-0 { margin-bottom: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
