/*
  J&J Vision – tablet web app.

  The kiosk is designed on a 1080 x 1920 portrait grid. Here 1rem = 10 design
  pixels, and app.js sets the root font size so the 1080-wide column fits the
  tablet (see fitStage). So "font-size: 6.4rem" is the kiosk's 64 px.
*/

@font-face { font-family: "Johnson Display"; src: url("fonts/JohnsonDisplay-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Johnson Display"; src: url("fonts/JohnsonDisplay-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Johnson Display"; src: url("fonts/JohnsonDisplay-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Johnson Text"; src: url("fonts/JohnsonText-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Johnson Text"; src: url("fonts/JohnsonText-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Johnson Text"; src: url("fonts/JohnsonText-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --red: #e1251b;
  --red-pressed: #b81d15;
  --navy: #112648;
  --ink: #161616;
  --body: #1f1f1f;
  --muted: #8c8c8c;
  --panel: #f4f3f1;
  --soft: #edebe8;
  --line: #d6d6d6;
  --pale-red: #f7d6d3;
  --card-line: #d8dce0;
  --col: 108rem;                 /* the 1080 px design column */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-size: 0.6px;              /* replaced by app.js */
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: #fff; color: var(--body);
  font-family: "Johnson Text", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  overscroll-behavior: none;
  touch-action: manipulation;
}

button { font: inherit; color: inherit; border: 0; background: none; padding: 0; margin: 0; cursor: pointer; }
img { display: block; -webkit-user-drag: none; }

.app {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  background: #fff;
}

/* Header & footer bars stretch edge to edge; their content stays on the column */
.bar-inner { width: var(--col); max-width: 100%; margin: 0 auto; height: 100%; display: flex; align-items: center; }

#header { flex: none; }
#header.is-home { flex: 1 20 46rem; min-height: 16rem; max-height: 46rem; display: flex; align-items: center; justify-content: center; padding-top: var(--safe-top); }
#header.is-home .wordmark { color: var(--red); font-family: "Johnson Display"; font-weight: 700; font-size: 9.2rem; letter-spacing: -0.05rem; }
#header.is-page { background: var(--red); height: calc(10rem + var(--safe-top)); padding-top: var(--safe-top); }
#header.is-page .bar-inner { padding: 0 2.4rem; gap: 1.6rem; color: #fff; }
#header.is-page .jnj { height: 2.4rem; width: auto; }
#header.is-page .spacer { flex: 1; }
#header.is-page .sep { font-size: 2.4rem; }
#header.is-page .vision { font-size: 1.8rem; }

#content { flex: 1 1 auto; min-height: 0; position: relative; overflow: hidden; }
/* Home: the header gives up its white space first, then the brand cards shrink,
   so all five brands always fit without scrolling. */
#content.home-content { flex: 1 1 125.2rem; }

#footer { flex: none; background: var(--red); height: calc(18rem + var(--safe-bottom)); padding-bottom: var(--safe-bottom); }
#footer.hidden { display: none; }
#footer .bar-inner { padding: 0 2.4rem 1.2rem; gap: 1.6rem; }
#footer .motto { height: 12rem; width: auto; margin: 0 auto; }
.round-btn {
  width: 9rem; height: 9rem; border-radius: 50%;
  background: #fff; color: var(--red);
  display: grid; place-items: center;
  box-shadow: 0 0.2rem 0.8rem rgba(0,0,0,.15);
  transition: background-color .12s;
}
.round-btn:active { background: #e8e8e8; }
.round-btn svg { width: 4.6rem; height: 4.6rem; }

/* ------------------------------------------------------------------ pages */

.page {
  position: absolute; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column; align-items: center;
  padding: 2.8rem 0;
}
.page > * { flex: none; }
.column { width: var(--col); max-width: 100%; }
.grow { flex: 1 0 0; }

.page-logo { height: 7rem; width: auto; margin: 0 auto 2rem; }
.banner { width: 100vw; max-width: none; height: auto; }
.banner-wrap { width: 100%; display: flex; justify-content: center; }

/* Home brand cards */
.page > .home-cards { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 2.4rem; }
.brand-card {
  width: 84rem; flex: 0 1 22rem; min-height: 11rem;
  border: 0.3rem solid #e8e8e8; border-radius: 2.4rem; background: #fff;
  display: grid; place-items: center; padding: 1rem;
  transition: background-color .12s;
}
.brand-card:active { background: #f5f7f9; }
.brand-card img { max-width: 60%; max-height: 78%; width: auto; height: auto; }
.brand-card .fallback { font-family: "Johnson Display"; font-weight: 700; font-size: 5.6rem; color: var(--navy); }

/* Sub menu: wide logo cards */
.menu-cards { display: flex; flex-direction: column; align-items: center; gap: 2.2rem; }
.menu-card {
  width: 76rem; height: 22rem; border: 0.1rem solid var(--card-line); border-radius: 1.2rem;
  background: #fff; display: grid; place-items: center; padding: 2.5rem 2rem; overflow: hidden;
}
.menu-card:active { background: #f5f7f9; }
.menu-card img { max-width: 100%; max-height: 100%; width: auto; height: auto; }

/* Logo grid (2 columns) */
.logo-grid { display: grid; grid-template-columns: 50rem 50rem; gap: 2rem; padding: 10rem 2rem 6rem; justify-content: center; }
.logo-grid .menu-card { width: 50rem; height: 30rem; padding: 0.5rem; }

/* Coloured action buttons */
.btn-stack { width: var(--col); padding: 0 10rem; display: flex; flex-direction: column; gap: 2rem; }
.btn-grid { width: var(--col); padding: 0 8rem; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.styled-btn {
  width: 100%; border-radius: 1.8rem; font-weight: 700; text-align: center; line-height: 1.15;
  letter-spacing: 0.03rem; color: #fff; display: flex; align-items: center; justify-content: center;
  overflow: hidden; white-space: nowrap; transition: filter .12s;
}
.styled-btn:active { filter: brightness(.88); }
.styled-btn.large { min-height: 12rem; padding: 3.2rem 2.4rem; font-size: 6.4rem; }
.styled-btn.medium { min-height: 10rem; padding: 2.4rem 2rem; font-size: 2.6rem; }
.styled-btn .label { display: block; }
.styled-btn .line + .line { margin-top: 0.3em; }
.styled-btn .line { display: block; }
.tm { font-size: 0.55em; vertical-align: 0.75em; line-height: 0; font-weight: 400; }

/* TECNIS */
.wordmark-list { width: var(--col); padding: 0 6rem; display: flex; flex-direction: column; gap: 1.4rem; }
.wordmark-card {
  height: 10.8rem; border: 0.1rem solid var(--card-line); border-radius: 1.2rem; background: #fff;
  color: #000; font-size: 4.2rem; white-space: nowrap; display: grid; place-items: center; padding: 0 6%;
}
.wordmark-card:active { background: #f5f7f9; }
.wordmark-card b { font-weight: 700; }
.wordmark-card .tm { font-size: 0.5em; vertical-align: 0.85em; }
.profiles-card {
  width: 96rem; height: 51rem; border: 0.1rem solid var(--card-line); border-radius: 1.2rem; background: #fff;
  padding: 2rem; display: flex; flex-direction: column; text-align: left;
}
.profiles-card:active { background: #f5f7f9; }
.profiles-card .collage { flex: 1; display: flex; background: var(--soft); overflow: hidden; }
.profiles-card .collage .photo { flex: 1; }
.profiles-card .row { height: 15rem; display: flex; align-items: flex-start; padding: 3.4rem 2.2rem 0 1.8rem; }
.profiles-card .titles { flex: 1; }
.profiles-card .title { font-size: 3.4rem; font-weight: 700; color: var(--ink); }
.profiles-card .cta { font-size: 2.3rem; font-weight: 700; color: var(--red); margin-top: 1.4rem; }
.circle-arrow { flex: none; border-radius: 50%; background: var(--red); display: grid; place-items: center; color: #fff; }
.circle-arrow svg { width: 50%; height: 50%; }
.disclaimer { font-size: 1.2rem; color: #6f6f6f; line-height: 1.35; }
.tecnis-disclaimer { width: 96rem; margin-top: 1.8rem; }

.photo { background-color: #e6e4e1; background-size: cover; background-repeat: no-repeat; }

/* Video */
.video-wrap { width: var(--col); padding: 0 4rem; margin-top: 6rem; }
.video-box { position: relative; background: #000; border-radius: 1.8rem; overflow: hidden; min-height: 60rem; display: grid; place-items: center; }
.video-box video { width: 100%; height: 100%; max-height: 120rem; display: block; background: #000; }
.video-overlay {
  position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.25);
  transition: opacity .2s;
}
.video-overlay.hidden { opacity: 0; pointer-events: none; }
.video-overlay .play { width: 18rem; height: 18rem; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; color: var(--red); }
.video-overlay .play svg { width: 8rem; height: 8rem; margin-left: 1rem; }
.video-status { color: #fff; font-size: 2.2rem; position: absolute; bottom: 3rem; left: 0; right: 0; text-align: center; }

/* PDF */
.page.pdf { padding-bottom: 0; overflow: hidden; }
.pdf-box { width: var(--col); flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding: 2rem 1rem; gap: 1.5rem; }
.pdf-indicator { color: #666; font-size: 1.6rem; font-weight: 600; text-align: center; padding: 1rem; }
.pdf-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; background: #f5f5f5; -webkit-overflow-scrolling: touch; }
.pdf-sheet { margin: 0 auto; width: 100rem; max-width: 100%; background: #fff; padding: 2rem; border: 0.1rem solid #e0e0e0; border-radius: 0.8rem; }
.pdf-sheet img { width: 100%; height: auto; background: #fafafa; }
.pdf-nav { display: flex; gap: 2rem; }
.pdf-nav button {
  flex: 1; height: 7rem; border-radius: 1.2rem; background: var(--red); color: #fff;
  font-size: 2rem; font-weight: 600;
}
.pdf-nav button:active { background: #a01813; }
.pdf-nav button:disabled { background: #ccc; color: #888; }

/* ----------------------------------------------------- patient profiles */

.section { position: absolute; inset: 0; display: flex; justify-content: center; }
.section-inner { width: var(--col); max-width: 100%; display: flex; height: 100%; }
.sidebar {
  width: 22.4rem; flex: none; background: var(--panel); display: flex; flex-direction: column;
  padding: 4.6rem 0 calc(4.6rem + var(--safe-bottom));
}
.section::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: calc((100% - var(--col)) / 2); background: var(--panel); }
.sidebar .brand-link { height: 7.2rem; padding-left: 4.4rem; text-align: left; font-size: 2rem; color: var(--muted); }
.sidebar .brand-link:active, .sidebar .name-link:active { color: var(--red); }
.sidebar .divider { height: 0.1rem; background: var(--line); margin: 1.8rem 4.4rem 2.8rem; }
.sidebar .active-block { background: #fff; border-left: 0.6rem solid var(--red); padding: 2.8rem 1rem 2.6rem 3.8rem; }
.sidebar .active-block svg.people { width: 5rem; height: 5rem; color: var(--red); }
.sidebar .section-title { display: block; height: 4.8rem; margin-top: 0.8rem; text-align: left; font-size: 2.1rem; color: var(--red); }
.sidebar .names { padding-top: 2rem; display: flex; flex-direction: column; }
.sidebar .names.closed { display: none; }
.sidebar .name-link { height: 4.2rem; text-align: left; font-size: 1.7rem; color: #767676; }
.sidebar .name-link.active { color: var(--ink); font-weight: 700; }
.sidebar .home-row { margin-top: auto; padding-left: 6.4rem; }
.red-round { width: 8.6rem; height: 8.6rem; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; }
.red-round:active { background: var(--red-pressed); }
.red-round svg { width: 4.3rem; height: 4.3rem; }

.section-main { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 0 4.4rem calc(2.6rem + var(--safe-bottom)); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.section-main.fixed { overflow: hidden; }
.list-title { font-family: "Johnson Display"; font-size: 5.4rem; color: var(--ink); margin-top: 5rem; }
.list-subtitle { font-size: 2rem; margin-top: 2.2rem; }
.patient-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.6rem; margin-top: 4rem; }
.patient-card { background: var(--soft); text-align: left; display: flex; flex-direction: column; }
.patient-card:active { background: #e2dfdb; }
.patient-card .photo { height: 27.8rem; }
.patient-card .row { height: 15rem; display: flex; align-items: flex-start; padding: 2.4rem 2.2rem 0; }
.patient-card .name { font-size: 2.5rem; font-weight: 700; color: var(--ink); }
.patient-card .age { font-size: 2.1rem; margin-top: 1.2rem; }
.patient-card .texts { flex: 1; }
.list-disclaimer { margin-top: 3.6rem; }

/* Stepper */
.stepper { display: flex; height: 4.6rem; margin-top: 3.2rem; flex: none; }
.step { flex: 1; display: flex; align-items: center; gap: 0.9rem; font-size: 1.5rem; color: #a8a8a8; position: relative; }
.step.reached { color: var(--ink); }
.step.current { font-weight: 700; }
.step .dot { width: 2.8rem; height: 2.8rem; border-radius: 50%; flex: none; margin-left: 0.2rem; display: grid; place-items: center; background: var(--pale-red); }
.step.done .dot { background: var(--red); color: #fff; }
.step.done .dot svg { width: 1.7rem; height: 1.7rem; }
.step.current .dot { background: none; border: 0.25rem solid var(--red); }
.step.current .dot::after { content: ""; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--red); }
.step + .step::before { content: ""; position: absolute; left: -6.4rem; width: 5.4rem; height: 0.2rem; background: var(--red); top: 50%; }

.profile-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin-top: 2.4rem; -webkit-overflow-scrolling: touch; }
.hero { display: flex; gap: 3rem; align-items: center; }
.hero .photo { width: 27.4rem; height: 27.4rem; flex: none; }
.hero .titles { display: flex; flex-direction: column; gap: 0.6rem; }
.hero h2 { margin: 0; font-family: "Johnson Display"; font-weight: 500; font-size: 4.1rem; color: var(--ink); }
.hero h3 { margin: 0; font-family: "Johnson Display"; font-weight: 400; font-size: 3.5rem; color: var(--ink); }
.hero .clinical-title { font-family: "Johnson Display"; font-size: 3.1rem; line-height: 1.18; color: var(--ink); }
.hero .counsel-title { font-family: "Johnson Display"; font-size: 3.9rem; line-height: 1.15; color: var(--ink); }
.flag { width: 6rem; height: 6rem; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; margin-top: 1.6rem; }
.flag svg { width: 3.2rem; height: 3.2rem; }

.accordion { border-bottom: 0.1rem solid var(--line); }
.accordion-head { width: 100%; height: 7.4rem; display: flex; align-items: center; gap: 1.8rem; padding-right: 0.6rem; color: var(--ink); text-align: left; }
.accordion.open .accordion-head { color: var(--red); }
.accordion-head .icon { width: 3.6rem; height: 3.6rem; flex: none; }
.accordion-head .title { flex: 1; font-size: 2.3rem; }
.accordion-head .chev { width: 4.2rem; height: 4.2rem; border-radius: 50%; background: var(--soft); display: grid; place-items: center; }
.accordion-head .chev svg { width: 2.2rem; height: 2.2rem; }
.accordion-body { padding: 0.2rem 0 2.6rem 5.4rem; }
.accordion:not(.open) .accordion-body { display: none; }

.bullets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.1rem; }
.bullets li { display: flex; font-size: 1.8rem; line-height: 1.12; }
.bullets li .mark { width: 3.2rem; flex: none; }
.bullets.check li .mark svg { width: 2rem; height: 2rem; color: var(--red); margin-top: 0.2rem; }
.bullets.check { padding-left: 0.8rem; }
sup { font-size: 0.65em; line-height: 0; }

.sub-heading { display: flex; align-items: center; gap: 1.8rem; font-size: 2.3rem; color: var(--ink); margin: 0 0 2.2rem; }
.sub-heading svg { width: 3.6rem; height: 3.6rem; flex: none; }
.hr { height: 0.1rem; background: var(--line); }

.why-row { display: flex; gap: 2.8rem; align-items: flex-start; }
.why-row .box { width: 12.4rem; flex: none; height: auto; }
.why-row .why { flex: 1; min-width: 0; }
.why-title { background: var(--soft); border-radius: 1.4rem; padding: 1.4rem 1.8rem; font-size: 1.9rem; font-weight: 700; color: var(--ink); margin-bottom: 2.2rem; }
.footnote { font-size: 1.2rem; color: #4a4a4a; margin-top: 0.5rem; line-height: 1.3; }

/* Question */
.question { position: relative; flex: none; margin-top: 2rem; padding-top: 0.6rem; }
.question .mark { position: absolute; right: 0.8rem; top: 0; width: 17.6rem; height: 17.6rem; color: #eceae7; pointer-events: none; }
.question .pill { position: relative; width: 16.6rem; height: 4.6rem; border-radius: 2.3rem; background: var(--soft); color: var(--ink); font-size: 1.6rem; font-weight: 700; display: grid; place-items: center; }
.question .text { position: relative; font-size: 1.9rem; font-weight: 700; color: var(--ink); line-height: 1.15; margin: 1.8rem 0 2.2rem; }
.answers { position: relative; display: flex; gap: 1.2rem; }
.answer {
  flex: 1; height: 15rem; background: #fff; border: 0.2rem solid #e4e2df; color: var(--red);
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 0.5rem; padding: 0.8rem 1rem; text-align: center;
}
.answer .a-title { font-size: 1.7rem; }
.answer .a-note { font-size: 1.3rem; display: none; }
.answer.selected { border: none; font-weight: 700; }
.answer.selected .a-note { display: block; font-weight: 400; }
.answer.selected.best { background: var(--red); color: #fff; }
.answer.selected.other { background: var(--soft); color: var(--ink); }

.step-nav { display: flex; justify-content: space-between; margin-top: 5.4rem; flex: none; }
.pill-btn { height: 6.8rem; border-radius: 3.4rem; padding: 0 3.2rem; font-size: 2.1rem; font-weight: 700; display: flex; align-items: center; gap: 2rem; }
.pill-btn.primary { background: var(--red); color: #fff; }
.pill-btn.primary:active { background: var(--red-pressed); }
.pill-btn.secondary { background: var(--soft); color: var(--red); }
.pill-btn.secondary:active { background: #dedbd7; }
.pill-btn svg { width: 3rem; height: 3rem; }
.profile-disclaimer { margin-top: 2.2rem; flex: none; }

/* Offline / error notice */
.notice { position: fixed; left: 50%; bottom: calc(20rem + var(--safe-bottom)); transform: translateX(-50%); background: rgba(22,22,22,.92); color: #fff; font-size: 2.2rem; padding: 1.6rem 2.8rem; border-radius: 1.2rem; z-index: 10; max-width: 90vw; text-align: center; }
