/* ============================================================
   Only Braces — base layer.
   The design carries its own layout in inline styles; this file
   only supplies the reset it was drawn against, the responsive
   switches the canvas runtime used to evaluate, and print rules.
   ============================================================ */

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

html { -webkit-text-size-adjust: 100%; }
body { background: #fff; }
a { color: inherit; text-decoration: none; }
img, video, svg, iframe { display: block; max-width: 100%; }
img, video { height: auto; }
ol, ul { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; }
::selection { background: #009ACE; color: #fff; }
[hidden] { display: none !important; }
.u-sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
        clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

:focus-visible { outline: 2px solid #009ACE; outline-offset: 3px; }

/* ── section heights the runtime used to compute ─────────────
   pinned  = desktop and no reduced-motion preference
   stacked = everything else                                    */
:root {
  --hero-h: 170vh;
  --cases-h: auto;
  --cases-overflow: auto;
  --journey-h: auto;
}
@media (min-width: 900px) {
  :root { --cases-h: 280vh; --cases-overflow: visible; --journey-h: 420vh; }
}
@media (prefers-reduced-motion: reduce) {
  :root { --hero-h: 100vh; --cases-h: auto; --cases-overflow: auto; --journey-h: auto; }
}

/* ── the two rendering branches ──────────────────────────────
   Both are in the document; only one is ever shown, exactly as
   the runtime's desktop / mobile / pinned / stacked flags did.  */
@media (max-width: 899px) {
  [data-view="desktop"], [data-view="pinned"] { display: none !important; }
}
@media (min-width: 900px) {
  [data-view="mobile"], [data-view="stacked"] { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  [data-view="pinned"] { display: none !important; }
  [data-view="stacked"] { display: block !important; }
}

/* the marquee only animates when motion is welcome */
@media (prefers-reduced-motion: reduce) {
  [data-ob="marquee"] { animation: none !important; }
  * { scroll-behavior: auto !important; }
}

/* The marquee is two copies of the same row, so half its own width is
   one full lap. The canvas runtime injected these keyframes; without them
   the row sat still with the second copy cut off at the edge. */
@keyframes ob-marquee { to { transform: translateX(-50%); } }

/* horizontal reels: hide the scrollbar, keep the scrolling */
[data-ob="reel"], [data-ob="casesRow"] { scrollbar-width: none; }
/* a card snaps to the page gutter it was drawn on, not to the bare edge
   of the screen */
[data-ob="reel"], [data-ob="casesRow"] { scroll-padding-inline: clamp(20px, 4vw, 40px); }
[data-ob="reel"] img, [data-ob="casesRow"] img { -webkit-user-drag: none; }
[data-ob="reel"].is-dragging, [data-ob="casesRow"].is-dragging { user-select: none; -webkit-user-select: none; }
[data-ob="reel"]::-webkit-scrollbar, [data-ob="casesRow"]::-webkit-scrollbar { display: none; }

/* anchor jumps clear the fixed header; Lenis handles its own offset,
   so the native behaviour is only used when Lenis is not running */
html:not(.lenis) { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto !important; } }
[id] { scroll-margin-top: 80px; }

/* the page's loading bar: the hero's model is most of what a first visit
   waits for, so its download runs across the top of the page */
.load { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 90;
        pointer-events: none; transition: opacity .5s .15s; }
.load__fill { display: block; width: 0; height: 100%; background: #009ACE;
              transition: width .2s linear; }
.load.is-done { opacity: 0; }

/* skip link */
.skip { position: fixed; top: -100px; left: 16px; z-index: 200; background: #000; color: #fff;
        padding: 12px 18px; font-family: 'Instrument Sans', system-ui, sans-serif; font-size: 14px; }
.skip:focus { top: 12px; }

@media print {
  [data-ob="gl"], [data-ob="rail"], [data-ob="marquee"] { display: none !important; }
  [data-ob="hero"] { height: auto !important; min-height: 0 !important; }
}

/* ============================================================
   Chrome as material
   The header floats over the page instead of owning a strip of
   it: the tray and the photographs pass underneath, blurred,
   and the hairline only arrives once there is content to part
   from. Bigger surfaces read as thicker, so the menu carries a
   heavier blur than the bar, and the bar goes clear while the
   menu is open so that two light sheets never stack.
   ============================================================ */
[data-ob="nav"] {
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
          backdrop-filter: saturate(180%) blur(20px);
  transition: border-color .3s, background-color .3s;
}
#ob-menu {
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(180%) blur(28px);
          backdrop-filter: saturate(180%) blur(28px);
}
.menu-open [data-ob="nav"] {
  background: transparent;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
/* without the blur there is nothing to separate the text from the page */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  [data-ob="nav"] { background: rgba(255, 255, 255, .94); }
  #ob-menu { background: #fff; }
}

/* The menu comes down out of the bar that opened it and goes back the
   same way. Held invisible by CSS rather than by the hidden attribute so
   it can be caught half-way: a second tap turns it round from wherever it
   has got to instead of waiting for the first to finish. */
.js #ob-menu {
  visibility: hidden; opacity: 0; transform: translateY(-12px);
  transition: opacity .22s ease-out, transform .32s cubic-bezier(.22,.61,.36,1), visibility 0s .32s;
}
.js #ob-menu.is-open {
  visibility: visible; opacity: 1; transform: none;
  transition: opacity .28s ease-out, transform .4s cubic-bezier(.22,.61,.36,1), visibility 0s;
}

/* the play chips sit on moving video: a light material, not a white box */
.chip {
  background: rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
          backdrop-filter: saturate(180%) blur(12px);
}

@media (prefers-reduced-transparency: reduce) {
  [data-ob="nav"], #ob-menu, .chip {
    background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none;
  }
}
@media (prefers-contrast: more) {
  [data-ob="nav"], #ob-menu, .chip {
    background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  [data-ob="nav"] { border-bottom-color: #000 !important; }
  .chip { outline: 1px solid #000; }
}
@media (prefers-reduced-motion: reduce) {
  .js #ob-menu, .js #ob-menu.is-open { transform: none; transition: opacity .2s ease, visibility 0s; }
  .js #ob-menu:not(.is-open) { transition: opacity .2s ease, visibility 0s .2s; }
}

/* ============================================================
   Shape
   Everything that is a picture, a film or a button is rounded;
   everything that is a rule, a table or a chart stays square.
   The whole softening lives in this one block: delete it and
   the page is sharp-cornered again.
   ============================================================ */
:root { --r-media: clamp(14px, 1.8vw, 24px); }
.media { border-radius: var(--r-media); overflow: hidden; }
/* Safari drops the rounding on a clipped child that is being transformed
   unless the parent is its own layer */
.media { isolation: isolate; }
.xh1, .xh2 { border-radius: 999px; }
/* the one button that floats over the page gets a shadow to float on */
a[data-view="mobile"].xh1 { box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }

/* a slow push in on whatever the cursor is over */
.media--zoom > img, .media--zoom > video { transition: transform .9s cubic-bezier(.22,.61,.36,1); }
@media (hover: hover) {
  /* not once a film is playing with its controls up: they would be cropped */
  .media--zoom:hover > img, .media--zoom:hover > video:not([controls]) { transform: scale(1.04); }
}
@media (prefers-reduced-motion: reduce) {
  .media--zoom:hover > img, .media--zoom:hover > video { transform: none; }
}

/* the divider's knob swells under the pointer the moment it is taken */
[data-ob="handle"] > div:last-child { transition: transform .12s ease-out; }
[data-ob="handle"].is-held > div:last-child { transform: scale(1.16); }
[data-clinic] > span:first-child { transition: background-color .2s; }

/* ============================================================
   Braces / aligners comparison
   One row per criterion, so the eye reads across instead of
   hopping between two lists that repeat the same four labels.
   ============================================================ */
.cmp { width: 100%; border-collapse: collapse; text-align: left; table-layout: fixed; }
.cmp th, .cmp td { vertical-align: top; font-weight: inherit; }
.cmp__head th, .cmp__head td { padding: 0 0 14px; border-bottom: 1px solid #000;
       font-family: 'Instrument Sans', system-ui, sans-serif; font-weight: 500; font-size: 15px; }
.cmp__head th:first-of-type { color: #6A6A6A; }
.cmp__head th:last-of-type { color: #009ACE; }
.cmp__row > * { padding: 22px clamp(16px, 1.8vw, 32px) 22px 0; border-bottom: 1px solid #E6E6E6; }
.cmp__row > *:last-child { padding-right: 0; }
.cmp__label { font-family: 'Instrument Sans', system-ui, sans-serif;
              font-size: 13px; line-height: 1.5; color: #6A6A6A; }
.cmp__braces   { color: #6A6A6A; }
.cmp__aligners { color: #000; }
.cmp__braces, .cmp__aligners { font-size: 16px; line-height: 1.5; }

/* the one figure worth drawing: treatment length, to scale */
.cmp__bar { display: block; height: 3px; width: var(--len); margin-top: 16px; background: #E6E6E6; }
.cmp__bar--on { background: #009ACE; }

@media (max-width: 760px) {
  .cmp, .cmp tbody, .cmp tr, .cmp th, .cmp td { display: block; width: auto; }
  .cmp thead { display: none; }
  .cmp__row { padding: 22px 0; border-bottom: 1px solid #E6E6E6; }
  .cmp__row > * { padding: 0; border: 0; }
  .cmp__label { font-size: 13px; margin-bottom: 12px; }
  .cmp__braces, .cmp__aligners { position: relative; padding-left: 92px !important; margin-top: 10px; }
  .cmp__braces::before, .cmp__aligners::before {
    content: attr(data-col); position: absolute; left: 0; top: 0; width: 80px;
    font-family: 'Instrument Sans', system-ui, sans-serif; font-size: 12px; line-height: 1.6; color: #6A6A6A;
  }
  .cmp__aligners::before { color: #009ACE; }
  .cmp__bar { margin-top: 10px; }
}

/* ============================================================
   Invisalign provider tiers
   A rank, not a measurement. The canvas drew an accelerating
   curve with no axis, so the heights read as a quantity the
   chart never named; and the two tiers above Diamond towered
   over the sentence calling it the highest held here. Seven
   even steps, each carrying its number, one baseline, one
   outline weight, and the name planted on the bar it belongs
   to rather than floating a hairline above it.
   ============================================================ */
.tier {
  --plot: clamp(220px, 26vw, 380px);
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));   /* one column per tier in index.html */
  gap: clamp(6px, 1vw, 16px);
  margin-top: 64px;
}
/* one continuous baseline behind the seven columns, rather than
   seven segments broken by the gaps */
.tier::after {
  content: ""; position: absolute; left: 0; right: 0; top: var(--plot);
  height: 1px; background: #000;
}
.tier__col  { position: relative; display: grid; grid-template-rows: var(--plot) auto; }
.tier__plot { display: flex; flex-direction: column; justify-content: flex-end; }
.tier__bar  { display: block; height: var(--h); border: 1px solid #BDBDBD; border-bottom: 0; }

/* the number is what says "rank" out loud. It sits outside the bar,
   which scales in from nothing on reveal and would flatten it. */
.tier__rank {
  position: absolute; left: 0; right: 0; top: calc(var(--plot) - 24px);
  text-align: center; color: #9A9A9A;
  font-family: 'Instrument Sans', system-ui, sans-serif; font-size: 12px; line-height: 1;
}
.tier__name {
  padding-top: 12px;
  font-family: 'Instrument Sans', system-ui, sans-serif;
  font-size: clamp(11px, 1.1vw, 13px); line-height: 1.4; color: #6A6A6A;
}
.tier__col--on .tier__bar  { background: #009ACE; border-color: #009ACE; }
.tier__col--on .tier__rank { color: #fff; }
.tier__col--on .tier__name { color: #000; font-weight: 500; }

/* the flag, drawn as the same column continued in outline, so the tier
   he holds reads as the tall one without the bars having to lie about
   the order underneath */
.tier__you {
  display: block; padding: 10px 12px;
  border: 1px solid #009ACE; border-bottom: 0;
  font-family: 'Instrument Sans', system-ui, sans-serif;
  font-size: clamp(11px, 1vw, 13px); line-height: 1.35; text-wrap: balance;
}
.tier__you-name { display: block; font-weight: 500; }
/* the figure the tier is earned on, so it reads as the point of the flag
   rather than a footnote to the name */
.tier__you-rate {
  display: block; margin-top: 8px; font-weight: 500;
  font-size: clamp(24px, 2.4vw, 32px); line-height: 1;
  letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.tier__you-unit { display: block; margin-top: 5px; color: #6A6A6A; }
.tier__you-sub  { display: block; margin-top: 8px; color: #6A6A6A; }

.tier__note {
  margin: 20px 0 0; max-width: 46ch;
  font-family: 'Instrument Sans', system-ui, sans-serif;
  font-size: 13px; line-height: 1.5; color: #6A6A6A;
}

/* Six columns on a phone is six 50px slivers under labels that wrap to
   three lines each. Below 760px the ladder lies down: one row per tier —
   rank, name, and a bar running to the right. The bars go solid here; an
   outlined box with a number in it reads as a text field. */
@media (max-width: 760px) {
  .tier { display: block; margin-top: 40px; }
  .tier::after { display: none; }
  .tier__col {
    display: grid; grid-template-columns: 18px 88px minmax(0, 1fr);
    grid-template-rows: auto; align-items: center; gap: 0 10px;
    padding: 11px 0; border-top: 1px solid #E6E6E6;
  }
  .tier__col:last-child { border-bottom: 1px solid #E6E6E6; }
  .tier__rank { position: static; grid-area: 1 / 1; text-align: left; }
  .tier__name { grid-area: 1 / 2; padding-top: 0; font-size: 13px; }
  .tier__plot { grid-area: 1 / 3; display: block; }
  .tier__bar  { width: var(--h); height: 10px; border: 0; background: #E6E6E6; }
  .tier__col--on .tier__rank { color: #009ACE; }
  .tier__you {
    margin-bottom: 10px; padding: 0 0 0 10px;
    border: 0; border-left: 2px solid #009ACE; font-size: 12px;
  }
  .tier__note { margin-top: 16px; }
}

/* ============================================================
   The FAQ answers
   Collapsed by CSS rather than by the hidden attribute, so the
   answer is styled, shaped and font-loaded once at page load
   instead of in the frame that starts the opening animation —
   which is the hitch you feel the first time you open each
   question. The attribute stays in the markup for a page
   without JS, where every answer simply reads.
   ============================================================ */
.faq-a   { padding-right: 48px; max-width: 62ch; }
/* the gap below the answer hangs off the paragraph, not off the panel:
   padding on the panel itself survives height:0 under border-box, and
   seven closed answers would leave seven bands of space down the list */
.faq-a > p { padding-bottom: 26px; }
.js .faq-a { height: 0; overflow: hidden; visibility: hidden; }
.js .faq-a.is-open { height: auto; visibility: visible; }

/* ============================================================
   Reveals — one moment per section, nothing that fires twice.
   Everything is opt-in through .js so the page still reads
   with scripting off, and under prefers-reduced-motion every
   one of them becomes a plain fade.
   ============================================================ */
.js [data-anim] { --d: calc(var(--i, 0) * 70ms); }

/* headings wipe up from their own baseline */
.js [data-anim="rise"] {
  clip-path: inset(0 0 105% 0); transform: translateY(.14em);
  transition: clip-path .85s cubic-bezier(.22,.61,.36,1), transform .85s cubic-bezier(.22,.61,.36,1);
}
/* comparison rows: the hairline draws, the text settles behind it */
.js [data-anim="row"] > * { border-bottom-color: transparent; }
.js [data-anim="row"] {
  opacity: 0; transform: translateY(10px);
  transition: opacity .6s var(--d) cubic-bezier(.22,.61,.36,1),
              transform .6s var(--d) cubic-bezier(.22,.61,.36,1);
}
.js [data-anim="row"] > * { transition: border-color .5s calc(var(--d) + 180ms) linear; }
/* the tier chart grows out of its baseline */
.js [data-anim="bar"] { transform: scaleY(0); transform-origin: 50% 100%;
  transition: transform .9s var(--d) cubic-bezier(.22,.61,.36,1); }
@media (max-width: 760px) {
  .js .tier__bar[data-anim="bar"] { transform: scaleX(0); transform-origin: 0 50%; }
}
/* the time bars draw to length */
.js [data-anim="len"] { width: 0; transition: width 1.1s .25s cubic-bezier(.22,.61,.36,1); }
/* the tier flag settles in after the bars it stands on */
.js [data-anim="fade"] {
  opacity: 0; transform: translateY(8px);
  transition: opacity .6s var(--d) cubic-bezier(.22,.61,.36,1),
              transform .6s var(--d) cubic-bezier(.22,.61,.36,1);
}

/* pictures and films come up into place, a little small at first */
.js [data-anim="media"] {
  opacity: 0; transform: translateY(32px) scale(.96);
  transition: opacity .7s var(--d) cubic-bezier(.22,.61,.36,1),
              transform 1s var(--d) cubic-bezier(.22,.61,.36,1);
}

/* The hero's headline and its button arrive once, on load. Keyframes
   rather than the scroll pass: the headline sits at the very foot of the
   first screen, below the line that pass reveals at, and an animation that
   always runs to its end cannot leave the page's first words hidden. */
@keyframes ob-rise {
  from { clip-path: inset(0 0 105% 0); transform: translateY(.14em); }
  to   { clip-path: inset(0 0 -20% 0); transform: none; }
}
@keyframes ob-fade { from { opacity: 0; } to { opacity: 1; } }
.js [data-ob="heroText"] > h1 { animation: ob-rise .95s cubic-bezier(.22,.61,.36,1) .1s both; }
.js [data-ob="heroText"] > a  { animation: ob-fade .6s ease-out .55s both; }
@media (prefers-reduced-motion: reduce) {
  .js [data-ob="heroText"] > h1 { animation: ob-fade .3s ease both; }
  .js [data-ob="heroText"] > a  { animation: ob-fade .3s ease both; }
}

.js [data-anim].is-in { transform: none; opacity: 1; }
.js [data-anim="rise"].is-in { clip-path: inset(0 0 -20% 0); }
.js [data-anim="len"].is-in { width: var(--len); }
.js [data-anim="row"].is-in > * { border-bottom-color: #E6E6E6; }

/* the FAQ's plus, drawn rather than typed, so it can open */
.sign { flex: none; position: relative; width: 24px; height: 24px; }
.sign::before, .sign::after {
  content: ""; position: absolute; left: 50%; top: 50%; background: #6A6A6A;
  transition: transform .32s cubic-bezier(.22,.61,.36,1), background-color .2s;
}
.sign::before { width: 15px; height: 1.5px; transform: translate(-50%, -50%); }
.sign::after  { width: 1.5px; height: 15px; transform: translate(-50%, -50%); }
[aria-expanded="true"] .sign::after { transform: translate(-50%, -50%) scaleY(0); }
[aria-expanded="true"] .sign::before { background: #009ACE; }

/* Reduced motion is not no feedback. Nothing travels, wipes or grows,
   but each block still arrives: a short fade in the place it will stay. */
@media (prefers-reduced-motion: reduce) {
  .js [data-anim] { clip-path: none !important; transform: none !important; opacity: 0;
                    transition: opacity .3s ease !important; }
  .js [data-anim].is-in { opacity: 1; }
  .js [data-anim="len"] { width: var(--len) !important; }
  .js [data-anim="row"] > * { border-bottom-color: #E6E6E6 !important; transition: none !important; }
  .sign::before, .sign::after { transition: none !important; }
}
