/* Styles for the free iPhone recording tool at /iphone.
   Tokens, type and button styles match the Framok landing page. */
:root {
  --bg: #000;
  --bg-2: #0d0d0f;
  --bg-3: #161618;
  --bg-4: #1d1d21;
  --line: rgba(255,255,255,.1);
  --text: #f5f5f7;
  --text-2: rgba(245,245,247,.62);
  --text-3: rgba(245,245,247,.38);
  --accent: #2f7bff;
  --accent-2: #6aa2ff;
  --violet: #7c6cff;
  --paper: #f5f5f7;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ease: cubic-bezier(.05,.7,.1,1);
  --dur: 320ms;
  color-scheme: dark;
}
* { box-sizing: border-box; }
/* Class rules below out-specify the user agent's [hidden] rule, so restate it. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.55 Onest, "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
img, video { max-width: 100%; }
[id] { scroll-margin-top: 80px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 22px; }

.bar { position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(180%) blur(20px); background: rgba(0,0,0,.72); border-bottom: 1px solid rgba(255,255,255,.06); }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.mark { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 17px; letter-spacing: -.01em; text-decoration: none; }
.mark i { width: 22px; height: 22px; border-radius: 6px; background: var(--text); display: grid; place-items: center; }
.mark i::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--bg); }
.bar nav { display: flex; gap: 22px; align-items: center; font-size: 14px; }
.bar nav a { color: var(--text-2); text-decoration: none; transition: color var(--dur) var(--ease); }
.bar nav a:hover, .bar nav a[aria-current] { color: var(--text); }
.bar nav a.dl { color: var(--accent-2); }
@media (max-width: 700px) { .bar nav a:not(.dl):not(.keep) { display: none; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px; border-radius: 999px; font: inherit; font-weight: 600; font-size: 16px; text-decoration: none; border: 0; cursor: pointer; transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease); }
.btn:active { transform: scale(.98); }
.btn.solid { background: var(--text); color: var(--bg); }
.btn.solid:hover { background: #fff; }
.btn.blue { background: var(--accent); color: #fff; }
.btn.blue:hover { background: #4a8dff; }
.btn.quiet { background: transparent; color: var(--accent-2); padding: 0 8px; }
.btn.quiet:hover { text-decoration: underline; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn:focus-visible, a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }

/* Head */
.head { padding: 62px 0 26px; }
h1 { font-size: clamp(34px, 6vw, 62px); line-height: 1.02; letter-spacing: -.035em; font-weight: 700; margin: 0 0 16px; max-width: 17ch; text-wrap: balance; }
.lead { font-size: clamp(17px, 2.1vw, 21px); line-height: 1.45; color: var(--text-2); max-width: 62ch; margin: 0 0 14px; text-wrap: pretty; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li { font-size: 13px; color: var(--text-2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; }
.chips li b { color: var(--text); font-weight: 600; }

/* Drop zone */
.drop { margin: 28px 0 0; border: 1.5px dashed rgba(255,255,255,.22); border-radius: 22px; background: linear-gradient(180deg, #131316, #0b0b0d); padding: 54px 24px; text-align: center; transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease); }
.drop.over { border-color: var(--accent-2); background: linear-gradient(180deg, #14161e, #0b0d12); }
.drop h2 { font-size: clamp(20px, 3vw, 27px); letter-spacing: -.02em; margin: 0 0 8px; font-weight: 700; max-width: none; }
.drop.compact { padding: 16px 20px; display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.drop.compact h2, .drop.compact > p { display: none; }
.drop p { color: var(--text-2); margin: 0 auto 20px; max-width: 52ch; font-size: 16px; }
.drop .fine { font-size: 13.5px; color: var(--text-3); margin-top: 16px; }
.drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }

.note { border-radius: 14px; padding: 13px 16px; font-size: 14.5px; line-height: 1.45; margin: 16px 0 0; }
.note.warn { background: rgba(255,159,10,.1); border: 1px solid rgba(255,159,10,.28); color: #ffcc80; }
.note.info { background: rgba(47,123,255,.1); border: 1px solid rgba(47,123,255,.28); color: #a8c8ff; }
.note.bad { background: rgba(255,69,58,.1); border: 1px solid rgba(255,69,58,.3); color: #ff9d96; }
.note b { color: #fff; }

/* Editor */
.editor { display: grid; grid-template-columns: minmax(0,1fr) 344px; gap: 20px; margin-top: 24px; align-items: start; }
@media (max-width: 1000px) { .editor { grid-template-columns: minmax(0,1fr); } }

.stagecol { min-width: 0; }
.previewWrap { position: relative; background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: grid; place-items: center; min-height: 300px; }
#preview { display: block; max-width: 100%; border-radius: 6px; touch-action: none; }
#preview.tap { cursor: crosshair; }
#preview.region { cursor: crosshair; }
.hint { color: var(--text-3); font-size: 13px; line-height: 1.45; margin: 8px 0 0; }
.modebar { position: absolute; left: 16px; top: 16px; display: flex; gap: 6px; z-index: 2; }
.pill { font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 12px; min-height: 32px; border-radius: 999px; border: 1px solid var(--line); background: rgba(18,18,22,.86); color: var(--text-2); cursor: pointer; backdrop-filter: blur(8px); }
.pill.on { background: var(--accent); border-color: transparent; color: #fff; }

.transport { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.tbtn { font: inherit; font-size: 14px; font-weight: 600; min-height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-3); color: var(--text); cursor: pointer; }
.tbtn:hover { border-color: rgba(255,255,255,.24); }
.tbtn.pri { background: var(--accent); border-color: transparent; color: #fff; }
.tbtn[disabled] { opacity: .45; cursor: not-allowed; }
.time { font-variant-numeric: tabular-nums; font-size: 14px; color: var(--text-2); }
#timeline { width: 100%; height: 88px; display: block; border-radius: 12px; background: var(--bg-3); margin-top: 12px; cursor: pointer; touch-action: none; }
#timeline.grab { cursor: ew-resize; }

/* Panel */
.panel { display: grid; gap: 10px; min-width: 0; }
.group { background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.group > summary { cursor: pointer; list-style: none; padding: 13px 16px; font-weight: 600; font-size: 15px; display: flex; justify-content: space-between; align-items: center; }
.group > summary::-webkit-details-marker { display: none; }
.group > summary::after { content: "+"; color: var(--text-3); font-size: 20px; font-weight: 300; line-height: 1; }
.group[open] > summary::after { content: "–"; }
.gbody { padding: 4px 16px 16px; display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field .lbl { display: flex; justify-content: space-between; align-items: baseline; font-size: 13.5px; color: var(--text-2); }
.field .lbl b { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; }
input[type=range] { width: 100%; accent-color: var(--accent); margin: 0; }
select, input[type=text], input[type=number], input[type=email] { font: inherit; font-size: 14px; background: var(--bg-3); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-height: 38px; width: 100%; }
input[type=color] { width: 42px; height: 34px; padding: 2px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-3); }
.seg { display: flex; gap: 4px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { flex: 1; font: inherit; font-size: 13px; font-weight: 600; min-height: 32px; border: 0; border-radius: 7px; background: transparent; color: var(--text-2); cursor: pointer; padding: 0 4px; }
.seg button.on { background: var(--bg-4); color: var(--text); box-shadow: 0 1px 0 rgba(255,255,255,.06) inset; }
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sw { aspect-ratio: 1.5; border-radius: 10px; border: 2px solid transparent; cursor: pointer; padding: 0; position: relative; }
.sw.on { border-color: #fff; }
.sw span { position: absolute; inset: auto 0 3px; font-size: 10px; color: rgba(255,255,255,.85); text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.switchrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; font-size: 14px; }
.switchrow input { appearance: none; width: 38px; height: 22px; border-radius: 11px; background: #3a3a45; position: relative; transition: background .15s; margin: 0; flex: none; cursor: pointer; }
.switchrow input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.switchrow input:checked { background: var(--accent); }
.switchrow input:checked::after { left: 18px; }
.rowbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.rowbtns .tbtn { flex: 1; min-width: 96px; }
.list { display: grid; gap: 6px; max-height: 210px; overflow-y: auto; }
.item { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 10px; padding: 7px 9px; }
.item.on { border-color: var(--accent); }
.item .lab { flex: 1 1 110px; min-width: 0; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .tag { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--violet); border: 1px solid rgba(124,108,255,.4); border-radius: 999px; padding: 1px 7px; flex: none; }
.item button { font: inherit; font-size: 12px; background: transparent; border: 1px solid var(--line); color: var(--text-2); border-radius: 7px; min-height: 26px; padding: 0 8px; cursor: pointer; }
.item button:hover { color: #fff; border-color: rgba(255,255,255,.3); }
.empty { color: var(--text-3); font-size: 13px; }

.prog { height: 8px; border-radius: 4px; background: var(--bg-4); overflow: hidden; }
.prog i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 160ms linear; }

/* Sections below */
section { padding: 84px 0; }
section.paper { background: var(--paper); color: var(--ink); color-scheme: light; }
h2 { font-size: clamp(28px, 4.4vw, 46px); line-height: 1.04; letter-spacing: -.03em; font-weight: 700; margin: 0 0 16px; max-width: 20ch; text-wrap: balance; }
.sub { font-size: clamp(17px, 1.9vw, 20px); line-height: 1.45; margin: 0; max-width: 60ch; text-wrap: pretty; color: var(--ink-2); }
.magnet { background: linear-gradient(180deg, #161618, #0d0d0f); border: 1px solid var(--line); border-radius: 24px; padding: 34px; display: grid; gap: 18px; margin-top: 42px; }
.magnet h2 { color: var(--text); margin: 0; font-size: clamp(24px, 3.4vw, 36px); }
.magnet p { color: var(--text-2); margin: 0; max-width: 58ch; font-size: 17px; }
.magnet .acts { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.magnet form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.magnet form input { max-width: 260px; }
.magnet .fine { font-size: 13.5px; color: var(--text-3); margin: 0; }
.faq { max-width: 800px; margin: 26px 0 0; }
.faq details { border-top: 1px solid rgba(0,0,0,.1); padding: 16px 0; }
.faq details:last-child { border-bottom: 1px solid rgba(0,0,0,.1); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; color: #86868b; font-weight: 300; transition: transform var(--dur) var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 10px 0 0; max-width: 64ch; color: var(--ink-2); font-size: 16px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 34px; }
.step { border-radius: 16px; border: 1px solid rgba(0,0,0,.1); padding: 22px; }
.step b { display: block; font-size: 16px; margin-bottom: 6px; }
.step p { margin: 0; font-size: 15px; color: var(--ink-2); line-height: 1.5; }
.step .n { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: .04em; margin-bottom: 8px; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

footer { border-top: 1px solid var(--line); padding: 30px 0 56px; color: var(--text-3); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
footer a { color: var(--text-3); text-decoration: none; margin-right: 18px; }
footer a:hover { color: var(--text); }

@media (max-width: 520px) {
  .head { padding: 40px 0 18px; }
  .drop { padding: 34px 16px; }
  .previewWrap { padding: 10px; }
  .magnet { padding: 22px; border-radius: 18px; }
  .modebar { left: 10px; top: 10px; }
}
