/* The golf showroom's landing (index.html): ctrl studio's dark page with the made-up club's site live in a laptop
   (a phone on small screens), and a note beside the screen for each feature as it scrolls past. golf.css gives the
   tokens, the bar and the pitch; this file is the rest. Motion: the smooth-site skill's scale. */
:root {
  --t-fast: 200ms; --t-normal: 300ms; --t-slow: 400ms; --t-xxslow: 800ms;
  --ease-out: cubic-bezier(.15, 1, .35, 1); --ease-in-out: cubic-bezier(.65, 0, 0, 1);
  --head: 200px;                                           /* the bar, the heading and the row under the laptop */
  --lw: min(78vw, calc((100svh - var(--head)) * 1.49), 1560px);   /* the lid's width; everything scales off it */
  color-scheme: dark;
}
@media (prefers-reduced-motion: reduce) { :root { --t-fast: 0ms; --t-normal: 0ms; --t-slow: 0ms; --t-xxslow: 0ms; } }
body.sc { background: var(--c-bg); color: var(--c-ink); }
.sc .sr-tools a.sr-btn { text-decoration: none; }
.sc .yours { padding-top: clamp(80px, 14vh, 160px); }

/* ---------- The landing ---------- */
.sc-hero { min-height: 100svh; padding: calc(var(--bar) + env(safe-area-inset-top) + 18px) var(--gutter) 18px; display: flex; flex-direction: column; align-items: center;
  background: radial-gradient(60% 50% at 50% 58%, rgb(255 90 31 / .07), transparent 70%), var(--c-bg); overflow-x: clip; }
.sc-head { width: var(--lw); }
.sc-head .label { font-size: 11px; }
.sc h1 { margin: 6px 0 0; font: 600 clamp(28px, 3.1vw, 46px)/1.04 var(--font-body); letter-spacing: -0.045em; }
.sc h1 span { color: var(--c-muted); }

/* the laptop: a lid (bezel, camera, screen) on a thin base; sizes are percentages of the lid's width */
.lap { position: relative; width: var(--lw); margin-top: 14px; perspective: 2400px; }
.lap-lid { position: relative; padding: 2.6% 2.4% 3.2%; border-radius: calc(var(--lw) * .024) calc(var(--lw) * .024) calc(var(--lw) * .006) calc(var(--lw) * .006);
  background: #1c1c1b; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .09), inset 0 0 0 calc(var(--lw) * .003) #0b0b0b, 0 40px 120px -40px rgb(0 0 0 / .8);
  transform-origin: 50% 100%; }
.lap-cam { position: absolute; top: 1.15%; left: 50%; width: calc(var(--lw) * .005); aspect-ratio: 1; translate: -50% 0; border-radius: 50%; background: #2c3a40; box-shadow: 0 0 0 1px #0b0b0b; }
.lap-screen { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 3px; background: #000; }
.lap-site { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; background: var(--paper); }
.lap-base { position: relative; z-index: 1; width: 112%; height: calc(var(--lw) * .018); margin: 0 -6%; border-radius: 2px 2px calc(var(--lw) * .02) calc(var(--lw) * .02) / 2px 2px calc(var(--lw) * .012) calc(var(--lw) * .012);
  background: linear-gradient(#55534e, #2a2927 45%, #1a1918); box-shadow: 0 30px 50px -20px rgb(0 0 0 / .9); }
.lap-base span { position: absolute; top: 0; left: 50%; width: 14%; height: 42%; translate: -50% 0; border-radius: 0 0 9px 9px; background: #2a2927; box-shadow: inset 0 1px 2px rgb(0 0 0 / .6); }

/* the lid opens as the page arrives */
@media (prefers-reduced-motion: no-preference) {
  .js .lap { animation: lap-rise var(--t-xxslow) var(--ease-out) both; }
  .js .lap-lid { animation: lap-open 1300ms var(--ease-out) 150ms both; }
  .js .sc-head { animation: sc-up var(--t-xxslow) var(--ease-out) both; }
  .js .sc-foot { animation: sc-up var(--t-xxslow) var(--ease-out) 900ms both; }
}
@keyframes lap-rise { from { opacity: 0; translate: 0 40px; } }
@keyframes lap-open { from { transform: rotateX(-82deg); filter: brightness(.35); } }
@keyframes sc-up { from { opacity: 0; translate: 0 16px; } }

/* "Scroll here to use the site", until the first scroll inside */
.lap-hint { position: absolute; left: 50%; bottom: 5%; z-index: 2; display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 16px 10px 12px; translate: -50% 12px;
  border-radius: 99px; background: rgb(15 15 14 / .82); color: var(--c-ink); font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgb(0 0 0 / .3); opacity: 0; pointer-events: none;
  transition: opacity var(--t-slow) var(--ease-out), translate var(--t-slow) var(--ease-out); }
.lap-hint.on { opacity: 1; translate: -50% 0; }
.lh-ico { position: relative; width: 14px; height: 22px; border-radius: 8px; border: 1.5px solid currentColor; }
.lh-ico::after { content: ""; position: absolute; left: 50%; top: 4px; width: 2px; height: 5px; translate: -50% 0; border-radius: 2px; background: var(--c-accent); animation: lh-wheel 1.6s var(--ease-out) infinite; }
@keyframes lh-wheel { 0% { opacity: 0; translate: -50% -2px; } 30% { opacity: 1; } 100% { opacity: 0; translate: -50% 7px; } }
.lh-touch { display: none; }
@media (hover: none) { .lh-touch { display: inline; } .lh-desk { display: none; } }

/* ---------- The notes beside the screen ---------- */
.lap-notes { position: absolute; top: 0; left: calc(100% - 44px); z-index: 3; width: min(252px, calc((100vw - var(--lw)) / 2 + 28px)); margin: 0; padding: 0; list-style: none; pointer-events: none; }
.note { position: absolute; top: 0; left: 0; width: 100%; padding: 12px 14px 13px 14px; border-radius: 14px; border: 1px solid var(--c-line); border-bottom-width: 3px;
  background: rgb(15 15 14 / .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 18px 40px -12px rgb(0 0 0 / .6);
  opacity: 0; translate: 18px var(--y, 0px); pointer-events: auto; cursor: pointer;
  transition: opacity var(--t-slow) var(--ease-out), translate var(--t-slow) var(--ease-out), border-color var(--t-fast); }
.note.on { opacity: 1; translate: 0 var(--y, 0px); }
.note:hover { border-color: rgb(255 90 31 / .55); }
.note::before { content: ""; position: absolute; top: 20px; right: 100%; width: 22px; height: 1px; background: var(--c-accent); }
.note::after { content: ""; position: absolute; top: 17px; right: calc(100% + 20px); width: 7px; height: 7px; border-radius: 50%; background: var(--c-accent); box-shadow: 0 0 0 4px rgb(255 90 31 / .25); }
.nt-top { display: flex; align-items: center; gap: 8px; font: 500 11px/1 var(--mono); color: var(--c-muted); }
.nt-top kbd { padding: 3px 4px 4px; font-size: 10px; border-color: var(--c-accent); color: var(--c-accent); }
.nt-pkg { margin-left: auto; color: var(--c-accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-name { margin: 9px 0 0; font: 600 16px/1.2 var(--font-body); letter-spacing: -0.02em; }
.nt-what { margin: 6px 0 0; font-size: 13px; line-height: 1.45; color: #b9b5ab; }

/* ---------- The row under the laptop ---------- */
.sc-foot { width: var(--lw); display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; }
.sc-sub { margin: 0; max-width: 60ch; font-size: 14px; line-height: 1.45; color: var(--c-muted); }
.sc-on { flex: none; display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--c-line); border-bottom-width: 3px;
  background: rgb(255 255 255 / .04); font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  transition: translate 90ms, border-bottom-width 90ms, background var(--t-fast), border-color var(--t-fast); }
.sc-on:hover { background: rgb(255 255 255 / .09); border-color: rgb(255 90 31 / .55); }
.sc-on:active { translate: 0 2px; border-bottom-width: 1px; }
.sc-arrow { color: var(--c-accent); }
@media (prefers-reduced-motion: no-preference) { .sc-arrow { animation: sc-bob 1.8s var(--ease-in-out) infinite; } }
@keyframes sc-bob { 50% { translate: 0 3px; } }

/* a gutter too narrow for the notes: they sit over the screen's right edge, narrower */
@media (max-width: 1180px) { .lap-notes { left: auto; right: 14px; width: 232px; } .note::before, .note::after { display: none; } }

/* ---------- Small screens: a phone in place of the laptop, one note under it ---------- */
@media (max-width: 760px) {
  :root { --head: 300px; --lw: min(78vw, calc((100svh - var(--head)) * .435)); }
  .sc-head { width: 100%; text-align: center; }
  .sc h1 { font-size: clamp(26px, 7.4vw, 36px); }
  .sc h1 span { display: block; }
  .lap { perspective: none; }
  .lap-lid { padding: 3.6%; border-radius: calc(var(--lw) * .15); background: #161615; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .12), inset 0 0 0 3px #050505, 0 30px 80px -30px rgb(0 0 0 / .9); }
  .lap-cam { top: 1.2%; width: 18%; height: calc(var(--lw) * .012); aspect-ratio: auto; border-radius: 99px; background: #050505; box-shadow: none; }
  .lap-screen { aspect-ratio: 390 / 844; border-radius: calc(var(--lw) * .118); }
  .lap-base { display: none; }
  .lap-hint { bottom: 7%; padding: 9px 13px 9px 10px; font-size: 10px; }
  .lap-notes { position: relative; left: auto; right: auto; width: min(100%, 340px); min-height: 62px; margin: 12px auto 0; }
  .note { position: relative; padding: 9px 12px 10px; translate: 0 8px; }
  .note.on { translate: 0 0; }
  .note::before, .note::after { display: none; }
  .note:not(.first) { display: none; }
  .nt-name { margin-top: 6px; font-size: 14px; }
  .nt-what { display: none; }
  .sc-foot { width: 100%; flex-direction: column; text-align: center; gap: 10px; margin-top: 12px; }
  .sc-sub { font-size: 13px; }
  @keyframes lap-open { from { transform: scale(.94); filter: brightness(.35); } }
}

/* ---------- The feature map: the course full screen, every map feature a switch (map.html in a frame) ---------- */
.sc-map { padding-top: clamp(64px, 12vh, 140px); }
.scm-head { width: min(1100px, 100% - 2 * var(--gutter)); margin: 0 auto 28px; display: grid; grid-template-columns: 1fr auto; gap: 10px 32px; align-items: end; }
.scm-head .label { grid-column: 1 / -1; font-size: 11px; }
.sc .scm-head h2 { grid-column: 1; margin: 0; font: 600 clamp(30px, 4.2vw, 58px)/1.02 var(--font-body); letter-spacing: -0.045em; }
.scm-head h2 span { color: var(--c-muted); }
.scm-sub { grid-column: 1; margin: 6px 0 0; max-width: 40rem; color: var(--c-muted); font-size: 16px; }
.scm-open { grid-column: 2; grid-row: 2 / 4; align-self: end; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 11px;
  border: 1px solid var(--c-line); border-bottom-width: 3px; color: var(--c-ink); text-decoration: none; font: 500 13px/1 var(--mono); white-space: nowrap; }
.scm-open:hover { background: rgb(255 255 255 / .09); border-color: rgb(255 90 31 / .55); }
.scm-frame { height: calc(100svh - var(--bar)); scroll-margin-top: var(--bar); border-block: 1px solid var(--c-line); background: #0c130f; }
.scm-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
@media (max-width: 760px) {
  .scm-head { grid-template-columns: 1fr; }
  .scm-open { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 6px; }
}
