/* ui.css - Noon Learn Design Study & Interactive Blueprint System */

:root {
  --navy: #0C3E56;
  --navy-dark: #082939;
  --navy-light: #165675;
  --sky: #4594BC;
  --sky-light: #5ba6cb;
  --sky-pale: #eaf5f9;
  --bg-page: #f7fafb;
  --bg-card: #ffffff;
  --border-subtle: #e2e8f0;
  --border-card: #e5edf2;
  --text-main: #0c3e56;
  --text-muted: #64748b;
  --text-sub: #4a6272;
  --success: #10b981;
  --warning: #f59e0b;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Georgia", "Cambria", serif;
  --radius-card: 18px;
  --radius-pill: 9999px;
  --shadow-phone: 0 24px 60px -12px rgba(12, 62, 86, 0.16), 0 0 0 1px rgba(12, 62, 86, 0.06);
  --shadow-card: 0 2px 8px rgba(12, 62, 86, 0.04);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Studio Header */
.studio-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.diamond {
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, var(--navy) 50%, var(--sky) 50%);
  transform: rotate(45deg);
  border-radius: 4px;
  display: inline-block;
  box-shadow: 0 2px 6px rgba(12, 62, 86, 0.2);
}

.brand strong {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.brand small {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}

.edition {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  background: var(--sky-pale);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(69, 148, 188, 0.2);
}

/* Main Container */
main {
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 32px 60px;
  flex: 1;
}

/* Intro Section */
.intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sky);
  margin-bottom: 6px;
}

.intro h1 {
  font-size: 38px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 8px;
}

.intro p {
  font-size: 16px;
  color: var(--text-sub);
  max-width: 620px;
}

#overview {
  background: #ffffff;
  color: var(--navy);
  border: 1px solid #d0dbe2;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

#overview:hover {
  background: var(--sky-pale);
  border-color: var(--sky);
}

#overview.active-overview {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
}

/* Toolbar */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--border-card);
  border-bottom: 1px solid var(--border-card);
  margin-bottom: 36px;
}

.roles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role-pill {
  background: transparent;
  border: 1px solid #d8e3e9;
  color: var(--text-sub);
  border-radius: var(--radius-pill);
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.role-pill:hover {
  border-color: var(--navy);
  color: var(--navy);
}

.role-pill.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(12, 62, 86, 0.25);
}

.toolbar label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

#screens {
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230c3e56' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat calc(100% - 12px) center;
  border: 1px solid #d8e3e9;
  border-radius: 8px;
  padding: 8px 34px 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease;
}

#screens:focus {
  border-color: var(--sky);
}

/* Comparison View */
.comparison {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 60px;
}

.comp-col {
  display: flex;
  flex-direction: column;
}

.comp-col-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 0 4px;
}

.comp-col-header strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}

.comp-col-header span {
  font-size: 12px;
  color: var(--text-muted);
}

/* Phone Mockup Housing */
.phone-mockup {
  width: 100%;
  max-width: 375px;
  height: 770px;
  background: #ffffff;
  border: 8px solid #ffffff;
  border-radius: 46px;
  box-shadow: var(--shadow-phone);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  margin: 0 auto;
}

/* iOS Status Bar */
.phone-status-bar {
  padding: 12px 22px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  background: #ffffff;
  user-select: none;
}

.status-time {
  font-feature-settings: "tnum";
}

.dynamic-island {
  width: 100px;
  height: 22px;
  background: #000000;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
}

.island-camera {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #111;
  box-shadow: inset 0 0 2px #333;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-icons svg {
  width: 15px;
  height: 12px;
  fill: currentColor;
}

/* Phone App Header */
.app-header {
  padding: 12px 20px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.app-brand-logo {
  display: flex;
  align-items: baseline;
  gap: 3px;
  text-decoration: none;
  color: var(--navy);
}

.logo-noon {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.logo-learn {
  font-family: var(--font-serif);
  font-size: 15px;
  font-style: italic;
  color: var(--sky);
  margin-left: 1px;
}

.app-header-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  flex: 1;
  text-align: center;
}

.header-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--navy);
  transition: background 0.15s ease;
}

.header-action-btn:hover {
  background: var(--sky-pale);
}

.header-action-btn svg {
  width: 17px;
  height: 17px;
}

/* Phone Scrollable Canvas */
.phone-canvas {
  flex: 1;
  overflow-y: auto;
  padding: 8px 18px 90px;
  background: #ffffff;
  scrollbar-width: none;
}

.phone-canvas::-webkit-scrollbar {
  display: none;
}

/* Screen Typography inside Phone */
.p-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.p-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
}

.p-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 3px;
  margin-bottom: 16px;
}

.p-meta-breadcrumbs {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 500;
}

/* Student Hero Continue Learning Card */
.hero-card {
  background: var(--navy);
  color: #ffffff;
  border-radius: var(--radius-card);
  padding: 18px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(69, 148, 188, 0.25) 0%, transparent 70%);
}

.hero-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #9cd2ec;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.hero-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
  color: #ffffff;
}

.hero-sub {
  font-size: 12px;
  color: #cfe6f3;
  margin-bottom: 14px;
}

.progress-track {
  height: 5px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}

.progress-fill {
  height: 100%;
  background: var(--sky);
  border-radius: 4px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #cfe6f3;
  margin-bottom: 14px;
}

.btn-hero-action {
  width: 100%;
  background: #ffffff;
  color: var(--navy);
  border: none;
  border-radius: var(--radius-pill);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.btn-hero-action:hover {
  transform: translateY(-1px);
}

/* Sections & Grids */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
  margin-top: 14px;
}

.section-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
}

.section-header a {
  font-size: 12px;
  font-weight: 600;
  color: var(--sky);
  text-decoration: none;
}

.grid-2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.card-nav {
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 94px;
  cursor: pointer;
  text-decoration: none;
  color: var(--navy);
  transition: all 0.2s ease;
  box-shadow: var(--shadow-card);
}

.card-nav:hover {
  border-color: var(--sky);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(12, 62, 86, 0.08);
}

.card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: var(--sky);
}

.card-icon svg {
  width: 22px;
  height: 22px;
}

.card-nav span {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.25;
}

/* Child Selector (Parent Portal) */
.child-selector-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}

.child-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.child-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--sky-pale);
  color: var(--navy);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.child-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}

.child-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.btn-switch-child {
  background: transparent;
  border: 1px solid #d8e3e9;
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}

/* Stat Cards (Parent Portal) */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 16px 14px;
  box-shadow: var(--shadow-card);
}

.stat-val {
  font-size: 24px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.25;
}

/* List Row Cards (Parent / Hub) */
.list-card {
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-card);
}

.list-card:hover {
  border-color: var(--sky);
  transform: translateY(-1px);
}

.list-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.list-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--sky-pale);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
}

.list-icon-box svg {
  width: 18px;
  height: 18px;
}

.list-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}

.list-card-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.badge-due {
  background: #eef4f7;
  color: var(--navy);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.chevron-icon {
  color: #a0aec0;
  font-size: 14px;
}

/* Teacher Shift Attendance Card */
.teacher-shift-card {
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
}

.shift-top {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 8px;
}

.shift-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 3px;
}

.shift-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.btn-check-in {
  width: 100%;
  background: var(--navy);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-check-in:hover {
  background: var(--navy-light);
}

/* Phone Bottom Floating Capsule Nav Dock (As Attached Reference) */
.phone-bottom-nav {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: 36px;
  padding: 6px 10px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  position: absolute;
  bottom: 22px;
  left: 16px;
  right: 16px;
  z-index: 20;
  box-shadow: 0 12px 28px rgba(12, 62, 86, 0.12), 0 2px 6px rgba(12, 62, 86, 0.04);
}

.bottom-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.bottom-tab:hover {
  color: var(--sky);
  background: var(--sky-pale);
}

.bottom-tab svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.85;
  fill: none;
}

/* Active Tab: Sleek Dark Circular Capsule Container (Phone 1 & Phone 3 in Reference Image) */
.bottom-tab.active {
  background: var(--navy);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(12, 62, 86, 0.28);
  transform: translateY(-1px);
}

.bottom-tab.active svg {
  stroke: #ffffff;
}

.bottom-tab span {
  display: none; /* Icon-first clean modern aesthetic as per reference file */
}

.phone-home-indicator {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 4px;
  background: #111;
  border-radius: 2px;
  z-index: 25;
}

/* Explorer Mode */
.explorer {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 60px;
}

.phone-host-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.phone-host-meta {
  width: 100%;
  max-width: 375px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.phone-host-meta strong {
  color: var(--navy);
  font-weight: 700;
}

.route-tag {
  font-family: monospace;
  font-size: 11px;
  background: #eef4f7;
  color: var(--navy);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #d4e2ea;
}

/* Notes Aside Panel */
#notes {
  background: transparent;
  padding: 10px 0 20px;
}

#notes .eyebrow {
  margin-bottom: 8px;
}

#notes h2 {
  font-size: 30px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 12px;
}

#notes .lead-desc {
  font-size: 16px;
  color: var(--text-sub);
  margin-bottom: 24px;
  line-height: 1.6;
}

#notes h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--navy);
  margin-top: 22px;
  margin-bottom: 8px;
}

#notes p {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.6;
}

#notes ul {
  list-style: none;
  padding-left: 0;
  margin-top: 6px;
  margin-bottom: 16px;
}

#notes li {
  font-size: 14px;
  color: var(--text-sub);
  margin-bottom: 8px;
  position: relative;
  padding-left: 18px;
  line-height: 1.5;
}

#notes li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: var(--sky);
  font-weight: bold;
}

/* Shared Foundations Section */
.system {
  border-top: 1px solid var(--border-card);
  padding-top: 48px;
  margin-bottom: 48px;
}

.system h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--navy);
  margin-top: 4px;
  margin-bottom: 28px;
  letter-spacing: -0.02em;
}

.foundation {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.foundation > div {
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.swatches {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.swatches span {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: inline-block;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.type-sample {
  font-size: 26px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.type-sample span {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
}

.spacing-sample {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 38px;
  margin-bottom: 20px;
}

.spacing-sample span {
  width: 14px;
  background: var(--sky);
  border-radius: 3px;
  display: inline-block;
}

.spacing-sample span:nth-child(1) { height: 10px; opacity: 0.4; }
.spacing-sample span:nth-child(2) { height: 18px; opacity: 0.6; }
.spacing-sample span:nth-child(3) { height: 26px; opacity: 0.8; }
.spacing-sample span:nth-child(4) { height: 36px; opacity: 1; }

.foundation h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.foundation p {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.5;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-card);
  padding-top: 24px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

footer a {
  color: var(--sky);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}

footer a:hover {
  color: var(--navy);
}

/* Responsive Styles */
@media (max-width: 1100px) {
  .comparison {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .explorer {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .foundation {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .studio-header {
    padding: 14px 20px;
  }
  main {
    padding: 24px 16px 40px;
  }
  .intro {
    flex-direction: column;
    align-items: flex-start;
  }
  .intro h1 {
    font-size: 28px;
  }
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .toolbar label {
    justify-content: space-between;
  }
}
