/* The front page (web/pages/front.html), on top of style.css: AutoCAD's dark model space with a
   picture of the viewer on the sample drawing, then the app's dark grey chrome (D24: <html
   class="dark-chrome"> swaps style.css's colours). Built for a thumb: the picture, then the one big
   button in a bar that stays in reach. home.css is not loaded (the first view stays within 160,000
   bytes on a phone): the pages that still use it follow this look later. */

body.front {
  --model: #212830;
  --deep: #1a1f26;
  --hairline: #444b55;
  --snap: #33d1e0;
  --gutter: clamp(16px, 3vw, 40px);
  height: auto;
  min-height: 100%;
  font: 400 18px/1.5 var(--text);
  font-variant-numeric: normal;
}
:where(.front h1, .front h2, .front p, .front ul, .front ol) { margin: 0; }
.front h2 { margin-bottom: 14px; font: 600 20px/1.25 var(--text); }
.front .wrap { padding-inline: var(--gutter); }

/* ---- Header: the name and the language, nothing else ---- */

.site-header { background: var(--paper); border-bottom: 1px solid var(--hairline); }
.front .bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 58px; }
.front .bar .brand { min-height: 44px; font-size: 21px; }
nav.language a, nav.language span { display: inline-grid; place-items: center; min-width: 46px; min-height: 44px; padding: 0 10px; border: 1px solid var(--rule); font-size: 16px; text-decoration: none; color: var(--pencil); }
nav.language :first-child { border-radius: 3px 0 0 3px; }
nav.language :last-child { border-radius: 0 3px 3px 0; margin-left: -1px; }
nav.language span { color: var(--graphite); border-color: var(--graphite); }

/* ---- Model space: the words, and the viewer on the sample drawing ---- */

.space {
  display: grid;
  grid-template-columns: minmax(280px, 400px) minmax(0, 1fr);
  min-height: max(520px, calc(100vh - 143px));
  min-height: max(520px, calc(100svh - 143px));
  background: var(--model);
}
.space-words { align-self: center; padding: clamp(28px, 5vw, 64px) var(--gutter); }
.front h1 { font: 600 clamp(34px, 4.2vw, 56px)/1.05 var(--text); letter-spacing: -0.01em; }
.lead { margin-top: 16px; max-width: 26ch; font-size: 20px; line-height: 1.45; color: var(--pencil); }
.canvas { display: grid; place-items: center; min-height: 0; padding: clamp(20px, 3vw, 44px); border-left: 1px solid var(--hairline); }
/* A still picture, never a control. The words and the button do not wait for it (decoding="async"). */
.shot img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: max(440px, calc(100svh - 230px));
  border: 1px solid var(--hairline);
  border-radius: 6px;
  box-shadow: 0 16px 48px rgb(0 0 0 / 0.45);
}

/* ---- The bar with the one button, in reach as the page scrolls ---- */

.command { position: sticky; bottom: 0; z-index: 5; background: var(--deep); border-top: 1px solid var(--hairline); }
.command .wrap { padding-block: 12px; }
.drop { position: relative; display: flex; align-items: center; gap: 18px; cursor: pointer; }
/* Hidden from view, not from the keyboard: Tab reaches it and Enter opens the picker. */
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.front .drop .button { flex: none; justify-content: center; min-height: 64px; padding: 0 44px; border-radius: 8px; font-size: 23px; font-weight: 600; }
.drop.dragging .button { background: var(--snap); border-color: var(--snap); }
.drop:has(.file-input:focus-visible) .button { outline: 2px solid var(--selection); outline-offset: 3px; }
.drop-text { display: grid; font-size: 16px; line-height: 1.35; color: var(--pencil); }
.drop-files { color: var(--graphite); font-weight: 600; }
.see-sample { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; color: var(--snap); }
.drop-status { margin-top: 10px; font-size: 16px; }
.drop-status:empty { display: none; }
.drop-status.error { padding: 12px 14px; border: 1.5px solid var(--graphite); border-left-width: 5px; background: var(--paper); font-weight: 600; }
.drop-status a { color: var(--snap); }
/* A file on its way to the viewer (opening-panel.js), in the zone's place. */
.front .opening { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 2px 16px; }
.front .opening-motion { grid-row: span 3; }
.front .opening-title { grid-column: 2; font: 600 20px/1.2 var(--text); }
.front .opening-file, .front .opening-stage { grid-column: 2; }
.front .opening .opening-cancel { grid-column: 3; grid-row: 1 / span 3; min-width: 0; margin: 0; padding: 0 18px; }
/* The 3D viewer's "This model is large" question (home.js). */
.big-model h2 { margin-bottom: 10px; font-size: 24px; }
.big-model p { font-size: 16px; }
.big-model button { min-height: 44px; }

/* ---- Below: what is promised, how it works, what opens, the promises ---- */

.below { background: var(--paper); }
.below-grid, .footer-grid { max-width: 1360px; }
.below-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 56px); padding-block: clamp(36px, 5vw, 64px); }
.col > h2:not(:first-child) { margin-top: 30px; }
/* The title strip's four promises, each ticked in the snap marker's colour (a square read as an empty checkbox). */
.title-strip { display: grid; grid-template-columns: repeat(2, minmax(0, auto)); gap: 6px 18px; padding: 0; list-style: none; font-weight: 600; }
.title-strip li { position: relative; padding-left: 20px; }
.title-strip li::before { content: ""; position: absolute; left: 3px; top: 0.25em; width: 6px; height: 11px; border: solid var(--snap); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.promise, .price-line { margin-top: 14px; font-size: 15px; line-height: 1.45; color: var(--pencil); }
.price-line a { color: var(--snap); padding-block: 15px; }
/* Prices in rupees first in India's time zone (D50 G1), marked by lang.js; else dollars. */
html:not([data-region="in"]) .in-india, html[data-region="in"] .not-india { display: none; }
.steps { display: grid; gap: 10px; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; padding-left: 36px; color: var(--pencil); counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--pencil); border-radius: 50%; font-size: 14px; color: var(--graphite); }
.steps strong { display: block; color: var(--graphite); }
/* The tools as a layer list: each with a swatch in an AutoCAD colour (1 to 8, in order). */
.tools-note { margin-bottom: 14px; font-size: 16px; color: var(--pencil); }
.register { padding: 0; list-style: none; border-top: 1px solid var(--hairline); }
.register li { border-bottom: 1px solid var(--hairline); }
.register a { display: grid; grid-template-columns: 14px minmax(0, 1fr); column-gap: 12px; padding: 9px 2px; text-decoration: none; }
.register a::before { content: ""; grid-row: span 2; width: 12px; height: 12px; margin-top: 7px; background: var(--swatch); }
.register li:nth-child(8n + 1) { --swatch: #ff3b3b; }
.register li:nth-child(8n + 2) { --swatch: #ffe14d; }
.register li:nth-child(8n + 3) { --swatch: #6ee06e; }
.register li:nth-child(8n + 4) { --swatch: var(--snap); }
.register li:nth-child(8n + 5) { --swatch: #4c7dff; }
.register li:nth-child(8n + 6) { --swatch: #e04ce0; }
.register li:nth-child(8n + 7) { --swatch: #fff; }
.register li:nth-child(8n + 8) { --swatch: #8b939c; }
.register-name { font-weight: 600; text-decoration: underline; text-decoration-color: var(--hairline); text-underline-offset: 4px; }
.register a:hover .register-name { text-decoration-color: currentColor; }
.register-text { font-size: 15px; color: var(--pencil); }
/* Each promise's link is 44 px high by its padding, without moving the lines. */
.promises { display: grid; gap: 4px; padding: 0; list-style: none; }
.promises li { padding: 5px 0 6px 14px; border-left: 2px solid var(--snap); font-size: 16px; line-height: 1.4; }
.promises a { padding: 13px 4px; color: var(--pencil); white-space: nowrap; }

/* ---- Footer: who, and the legal pages ---- */

.page-footer { padding: 28px 0 36px; background: var(--deep); font-size: 15px; color: var(--pencil); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px 48px; }
.footer-about .brand { margin-bottom: 8px; font-size: 19px; color: var(--graphite); }
.footer-about p:not(.brand) { max-width: 36em; margin-bottom: 4px; }
.footer-help a, .footer-searches a, .footer-legal a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; }
.footer-help a, .footer-support a, .footer-searches a { color: var(--graphite); }
.footer-support a { padding-block: 15px; }
.footer-searches a { justify-content: center; }
.footer-legal { display: flex; flex-wrap: wrap; align-content: start; gap: 0 22px; }
.footer-legal a:hover { color: var(--graphite); }
.legal-note { flex-basis: 100%; }

/* ---- A phone, and a window too short for a bar that stays ---- */

@media (hover: none) { .drop-hint { display: none; } }
@media (min-width: 761px) { body.front { font-size: 19px; } }
@media (min-width: 761px) { .command .wrap { display: flex; flex-wrap: wrap; align-items: center; column-gap: 28px; } .drop-status { flex-basis: 100%; } }
@media (max-width: 960px) {
  .below-grid, .footer-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .space { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .space-words { padding-block: 20px 8px; }
  .front h1 { font-size: clamp(30px, 8.4vw, 38px); }
  .lead { margin-top: 8px; max-width: none; font-size: 18px; }
  .canvas { padding: 8px var(--gutter) 24px; border-left: 0; }
  /* The phone's picture in a plain phone outline. */
  .shot img { width: min(300px, 78vw); max-height: none; border: 7px solid #0d1014; border-radius: 30px; outline: 1px solid var(--hairline); }
}
/* A short window: a slimmer bar. */
@media (max-height: 520px) {
  .command .wrap { padding-block: 8px; }
  .front .drop .button { min-height: 48px; }
}
/* A phone on its side (wide enough for both): the words beside the picture. A short phone upright
   (320 x 480) stacks them, as every portrait window does. */
@media (orientation: landscape) and (min-width: 560px) and (max-width: 860px) and (max-height: 520px) {
  .space { grid-template-columns: minmax(180px, 300px) minmax(0, 1fr); min-height: calc(100vh - 130px); }
  .space-words { padding-block: 12px; }
  .front h1 { font-size: 26px; }
  .canvas { border-left: 1px solid var(--hairline); }
  .shot img { width: auto; max-height: calc(100vh - 160px); }
}
@media (max-width: 760px) {
  .front .drop .button { flex: 1; padding: 0 16px; font-size: 20px; }
  .command .wrap { padding-block: 10px calc(10px + env(safe-area-inset-bottom)); }
  .drop { gap: 12px; }
  .drop-text { max-width: 9.5em; font-size: 14px; }
  .see-sample { font-size: 15px; }
  .below-grid { gap: 26px; padding-block: 28px; }
  /* The tools by name, two to a row; what each opens is on its page. */
  .register { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }
  .register a { align-items: center; min-height: 48px; padding-block: 8px; }
  .register a::before { grid-row: auto; margin-top: 0; }
  .register-text { display: none; }
  .promises li { font-size: 15px; }
  .page-footer { padding-block: 16px; font-size: 14px; }
  .footer-grid { gap: 0; }
  .footer-about .brand { margin-bottom: 4px; font-size: 17px; }
  .footer-about .about { display: none; } /* what the page's title says already */
  .footer-legal { gap: 0 16px; }
}
