/* ============================================================
   IELTS BY AHMAD — brand stylesheet
   Palette: deep academic navy + warm gold accent
   ============================================================ */
:root {
  --navy:        #0C2D57;   /* primary / ink */
  --navy-700:    #103a6e;
  --navy-600:    #1657a0;
  --blue:        #1E5BB8;   /* interactive blue */
  --gold:        #F4B740;   /* accent / CTA */
  --gold-600:    #e0a52f;
  --green:       #2E9E6B;
  --red:         #E0533D;
  --amber:       #E8923B;

  --bg:          #F5F8FD;
  --surface:     #FFFFFF;
  --surface-2:   #F0F4FA;
  --ink:         #16233A;
  --muted:       #5C6B82;
  --line:        #E2E9F3;

  --radius:      16px;
  --radius-sm:   10px;
  --shadow:      0 10px 30px rgba(12,45,87,.08);
  --shadow-lg:   0 20px 50px rgba(12,45,87,.16);
  --maxw:        980px;
  --font:        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(30,91,184,.10), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(244,183,64,.10), transparent 55%),
    var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---- Header / brand ---- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 66px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo {
  width: 40px; height: 40px; border-radius: 11px;
  background: linear-gradient(150deg, var(--navy), var(--navy-600));
  display: grid; place-items: center; color: var(--gold);
  font-weight: 800; font-size: 18px; letter-spacing: .5px;
  box-shadow: inset 0 0 0 1.5px rgba(244,183,64,.5);
}
.brand .name { line-height: 1.05; }
.brand .name b { display: block; color: var(--navy); font-size: 16px; letter-spacing: .3px; }
.brand .name span { font-size: 11px; color: var(--muted); letter-spacing: 2px; text-transform: uppercase; }
.nav { display: flex; gap: 6px; }
.nav a {
  padding: 8px 14px; border-radius: 999px; color: var(--navy);
  font-size: 14px; font-weight: 600;
}
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.active { background: var(--navy); color: #fff; }

/* ---- Hero ---- */
.hero { padding: 56px 0 28px; text-align: center; }
.hero .kicker {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: rgba(30,91,184,.10); color: var(--navy-600);
  font-size: 12.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  margin-bottom: 18px;
}
.hero h1 { font-size: clamp(30px, 5vw, 46px); margin: 0 0 14px; color: var(--navy); letter-spacing: -.5px; }
.hero p { font-size: 18px; color: var(--muted); max-width: 620px; margin: 0 auto; }

/* ---- Cards / layout ---- */
.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 760px){ .grid.cols-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
}
.card h2 { margin: 0 0 8px; color: var(--navy); font-size: 22px; }
.card h3 { margin: 0 0 6px; color: var(--navy); font-size: 17px; }
.card .lead { color: var(--muted); margin: 0 0 18px; }
.feature-card { position: relative; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feature-card .pill {
  display:inline-block; font-size:12px; font-weight:700; letter-spacing:.5px;
  padding:5px 11px; border-radius:999px; margin-bottom:14px;
}
.pill.blue { background: rgba(30,91,184,.12); color: var(--navy-600); }
.pill.gold { background: rgba(244,183,64,.18); color: var(--gold-600); }

/* ---- Buttons ---- */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-700); text-decoration: none; }
.btn-gold { background: linear-gradient(180deg, var(--gold), var(--gold-600)); color: #3a2a05; box-shadow: 0 8px 18px rgba(244,183,64,.35); }
.btn-gold:hover { text-decoration:none; filter: brightness(1.03); }
.btn-ghost { background: var(--surface); color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); text-decoration:none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-block { width: 100%; }

/* ---- Forms ---- */
.field { margin-bottom: 16px; }
.field label { display:block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--navy); }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
input[type=text], input[type=tel], input[type=password], textarea, select {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--ink);
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { resize: vertical; min-height: 220px; line-height: 1.6; }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(30,91,184,.12);
}
.row { display:flex; gap: 14px; flex-wrap: wrap; }
.row > * { flex: 1 1 200px; }

/* ---- Misc UI ---- */
.notice {
  padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px;
  border: 1px solid; margin-bottom: 16px;
}
.notice.err { background:#fdecea; border-color:#f5c6c0; color:#9b271a; }
.notice.ok  { background:#e9f7f0; border-color:#bfe6d3; color:#1c6b46; }
.notice.info{ background:#eef4fd; border-color:#cfe0f7; color:#1a3f73; }
.hidden { display: none !important; }

.badge { display:inline-block; padding:3px 10px; border-radius:999px; font-size:12px; font-weight:700; }
.badge.cefr { background: var(--navy); color:#fff; }
.code-chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight:700;
  letter-spacing:1px; background: var(--surface-2); border:1px dashed var(--navy-600);
  color: var(--navy); padding:4px 10px; border-radius:8px;
}

/* progress */
.progress-wrap { display:flex; align-items:center; gap:14px; margin: 6px 0 22px; }
.progress-track { flex:1; height:10px; background: var(--surface-2); border-radius:999px; overflow:hidden; }
.progress-bar { height:100%; width:0%; background: linear-gradient(90deg, var(--blue), var(--gold)); transition: width .3s ease; }
.progress-label { font-size:13px; font-weight:700; color: var(--navy); white-space:nowrap; }

/* questions */
.q-card { border:1px solid var(--line); border-radius: var(--radius); padding: 22px; background:#fff; box-shadow: var(--shadow); }
.q-section { font-size:12px; font-weight:800; letter-spacing:1px; text-transform:uppercase; color: var(--blue); }
.q-prompt { font-size:18px; font-weight:600; color: var(--navy); margin:8px 0 18px; }
.options { display:grid; gap:10px; }
.option {
  display:flex; align-items:center; gap:12px; padding:13px 15px; cursor:pointer;
  border:1.5px solid var(--line); border-radius: var(--radius-sm); background:#fff;
  transition: border-color .12s ease, background .12s ease;
}
.option:hover { border-color: var(--navy-600); background: var(--surface-2); }
.option input { accent-color: var(--navy); width:18px; height:18px; }
.option.selected { border-color: var(--blue); background: #eef4fd; }
.passage {
  background: var(--surface-2); border:1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 18px;
}
.passage h4 { margin:0 0 10px; color: var(--navy); }
.passage p { margin: 0 0 12px; }

/* results */
.score-hero { text-align:center; padding: 10px 0 6px; }
.score-ring {
  width: 150px; height:150px; margin: 0 auto 14px; border-radius:50%;
  display:grid; place-items:center;
  background: conic-gradient(var(--gold) var(--pct,0%), var(--surface-2) 0);
}
.score-ring .inner {
  width:120px; height:120px; border-radius:50%; background:#fff; display:grid; place-items:center;
  box-shadow: var(--shadow);
}
.score-ring .band { font-size:34px; font-weight:800; color:var(--navy); line-height:1; }
.score-ring .lbl { font-size:11px; letter-spacing:1px; text-transform:uppercase; color:var(--muted); }
.section-bars { display:grid; gap:12px; margin-top:6px; }
.section-bars .sb { }
.section-bars .sb .top { display:flex; justify-content:space-between; font-size:14px; font-weight:600; margin-bottom:4px; }
.section-bars .sb .track { height:9px; background:var(--surface-2); border-radius:999px; overflow:hidden; }
.section-bars .sb .fill { height:100%; background: var(--blue); }

/* tables */
table { width:100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align:left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size:12px; letter-spacing:.5px; text-transform:uppercase; color: var(--muted); }
tr:hover td { background: var(--surface-2); }

/* analysis */
.crit { border:1px solid var(--line); border-radius: var(--radius-sm); padding:16px 18px; margin-bottom:12px; }
.crit .head { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.crit .head b { color: var(--navy); font-size:16px; }
.crit .bandtag { background: var(--navy); color:#fff; font-weight:800; padding:4px 12px; border-radius:999px; font-size:14px; }
.crit ul { margin: 6px 0 0; padding-left: 18px; }
.crit ul li { margin-bottom: 4px; }
.corr { border-left: 3px solid var(--amber); padding: 8px 12px; margin-bottom:10px; background: #fff8ef; border-radius: 0 8px 8px 0; }
.corr .o { text-decoration: line-through; color: var(--red); }
.corr .c { color: var(--green); font-weight: 600; }
.corr .e { font-size: 13px; color: var(--muted); margin-top: 4px; }

footer.site-footer { text-align:center; color: var(--muted); font-size: 13px; padding: 40px 0 30px; }

.spinner {
  width: 18px; height:18px; border:2.5px solid rgba(255,255,255,.45); border-top-color:#fff;
  border-radius:50%; animation: spin .7s linear infinite;
}
.spinner.dark { border-color: rgba(12,45,87,.25); border-top-color: var(--navy); }
@keyframes spin { to { transform: rotate(360deg); } }
.center { text-align:center; }
.muted { color: var(--muted); }
.mt { margin-top: 18px; } .mt2 { margin-top: 28px; }
.stack > * + * { margin-top: 14px; }

/* ================= MOBILE / PHONE ================= */
@media (max-width: 760px){
  .container { padding: 0 16px; }

  /* Header: stack the brand over the nav so 5 links never overflow */
  .site-header .container { flex-direction: column; align-items: stretch; height: auto; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .nav { flex-wrap: wrap; gap: 6px 8px; }
  .nav a { padding: 7px 12px; font-size: 13.5px; }
  .brand .name b { font-size: 15px; }
  .brand .name span { font-size: 10px; letter-spacing: 1.5px; }

  /* Hero: tighter and readable on small screens */
  .hero { padding: 30px 0 18px; }
  .hero h1 { font-size: clamp(24px, 7.5vw, 32px); }
  .hero p { font-size: 15.5px; }
  .hero .kicker { font-size: 11.5px; margin-bottom: 14px; }

  /* Cards & forms a touch tighter */
  .card { padding: 20px 18px; }
  .card h2 { font-size: 20px; }
  .row { gap: 12px; }
  input[type=text], input[type=tel], input[type=password], textarea, select { font-size: 16px; } /* 16px stops iOS zoom-on-focus */

  /* Score ring / detail scale down */
  .score-ring { width: 130px; height: 130px; }
  .score-ring .inner { width: 104px; height: 104px; }
  .score-ring .band { font-size: 30px; }
}

/* ---- very small phones ---- */
@media (max-width: 400px){
  .brand .logo { width: 34px; height: 34px; font-size: 16px; }
  .nav a { padding: 6px 10px; font-size: 13px; }
  .btn { padding: 11px 16px; font-size: 14px; }
  .hero h1 { font-size: 23px; }
}
