/* Phone and portrait-tablet layouts only. Desktop styling remains in depth.css. */
@media screen and (max-width:900px) {
  html { scroll-padding-top: calc(86px + env(safe-area-inset-top,0px)); -webkit-text-size-adjust:100%; }
  body { font-size:16px; }
  body.nav-open { overflow:hidden; }
  .container { width:calc(100% - 48px); max-width:680px; }
  /* A filtered header would contain and clip its fixed full-screen menu. */
  .site-header { padding-top:env(safe-area-inset-top,0px); background:#000; backdrop-filter:none; -webkit-backdrop-filter:none; }
  .nav { height:64px; justify-content:space-between; gap:16px; }
  .nav .brand { min-height:44px; font-size:18px; }
  .menu-toggle { display:flex; align-items:center; flex-direction:column; justify-content:center; gap:6px; width:44px; height:44px; padding:10px; border:1px solid #39362f; border-radius:8px; background:#ffffff03; }
  .menu-toggle span { display:block; width:20px; height:1px; background:#eee9df; }
  .menu-toggle[aria-expanded=true] span:first-child { transform:translateY(3.5px) rotate(45deg); }
  .menu-toggle[aria-expanded=true] span:last-child { transform:translateY(-3.5px) rotate(-45deg); }
  .nav-content { display:none; position:fixed; top:calc(64px + env(safe-area-inset-top,0px)); bottom:0; left:0; right:0; padding:18px max(24px,env(safe-area-inset-right,0px)) max(28px,env(safe-area-inset-bottom,0px)) max(24px,env(safe-area-inset-left,0px)); max-height:calc(100dvh - 64px - env(safe-area-inset-top,0px)); overflow-y:auto; overscroll-behavior:contain; background:#090909; border-top:1px solid #292721; box-shadow:none; }
  .nav-content.is-open { display:block; }
  .nav-links { display:flex; flex-direction:column; align-items:stretch; gap:0; font-size:16px; max-width:680px; margin-inline:auto; }
  .nav-links>a,.products-menu summary { display:flex; justify-content:space-between; align-items:center; min-height:56px; padding:14px 0; border-bottom:1px solid #302c25; }
  .chevron { width:8px; height:8px; margin-right:5px; }
  .dropdown { position:static; width:100%; margin:8px 0 14px; padding:6px; box-shadow:none; border-radius:10px; }
  .dropdown a { padding:16px 12px; min-height:52px; }
  .dropdown strong { font-size:15px; gap:8px; }
  .dropdown small { font-size:13px; }
  .dropdown a.dropdown-all { font-size:14px; }
  .mini-tag { font-size:9px; }
  .nav-content>.button { display:flex; min-height:52px; width:100%; max-width:680px; margin:26px auto 0; font-size:15px; }

  .hero-grid { display:grid; grid-template-columns:minmax(0,1fr); min-height:0; padding:42px 0 20px; gap:18px; }
  .hero-copy { padding:0; max-width:none; }
  .hero-copy .eyebrow { font-size:10px; letter-spacing:1.1px; line-height:1.6; margin-bottom:24px; }
  .hero h1 { font-size:clamp(28px,10vw,58px); line-height:1.15; letter-spacing:-.035em; margin-bottom:24px; text-align:left; text-wrap:wrap; }
  .hero .orange { display:inline; white-space:nowrap; }
  .hero-description { font-size:16px; line-height:1.75; max-width:520px; margin-bottom:26px; }
  .hero .hero-description { margin-inline:0; line-height:1.7; text-align:left; text-wrap:pretty; }
  .hero-description-lead { display:block; margin-bottom:10px; font-size:17px; line-height:1.55; color:#e2dfd9; text-wrap:balance; }
  .hero-description-detail { display:block; }
  .desktop-break { display:none; }
  .button-row { display:grid; grid-template-columns:1.45fr 1fr; gap:10px; max-width:480px; }
  .hero .button { min-height:52px; padding:14px 16px; font-size:14px; gap:12px; justify-content:space-between; white-space:normal; }
  .button span { flex-shrink:0; }
  .hero-note { font-size:12px; line-height:1.7; margin-top:20px; max-width:430px; align-items:flex-start; gap:9px; }
  .hero-note .tiny-orbit { font-size:19px; padding-top:1px; flex-shrink:0; }
  .hero-art { width:calc(100% + 24px); max-width:720px; height:clamp(370px,85vw,570px); margin:0 0 0 -12px; }
  #orbit-scene { height:100%; }
  .scene-label { font-size:12px; padding:11px 14px; gap:8px; background:rgba(15,15,15,.85); }
  .scene-label small { font-size:8px; letter-spacing:.75px; margin-top:5px; }
  .label-a { top:10%; right:2%; left:auto; bottom:auto; }
  .label-b { top:auto; bottom:10%; left:2%; right:auto; }
  .hero-footer { flex-direction:column; align-items:stretch; padding-block:22px; gap:16px; }
  .hero-footer>span { font-size:9px; line-height:1.6; }
  .hero-footer>div { display:flex; justify-content:space-between; gap:14px; width:100%; font-size:11px; line-height:1.7; }
  .hero-footer>div>span { display:flex; align-items:center; gap:8px; }
  .hero-footer b { display:inline; font-size:18px; margin:0; }

  .section { padding-block:64px; }
  .eyebrow { font-size:10px; line-height:1.6; letter-spacing:1.1px; margin-bottom:18px; }
  .section-heading { display:block; margin-bottom:30px; }
  .section-heading h2,h2,.company-grid h2,.faq-grid h2 { font-size:clamp(32px,5.8vw,40px); line-height:1.15; letter-spacing:-1.1px; }
  .section-heading>p { font-size:15px; line-height:1.8; max-width:530px; margin:20px 0 0; }
  .product-grid { grid-template-columns:minmax(0,1fr); gap:24px; }
  .product-card { padding:26px 26px 0; border-radius:16px; transform:none; }
  .product-meta { flex-wrap:wrap; align-items:center; gap:10px; margin-bottom:24px; }
  .product-category { font-size:10px; line-height:1.5; letter-spacing:.5px; }
  .status,.status.available { font-size:11px; line-height:1.5; padding:4px 9px; }
  .product-name { gap:12px; margin-bottom:18px; }
  .product-name h3 { font-size:30px; }
  .product-icon { width:40px; height:40px; }
  .product-description { font-size:17px; line-height:1.5; min-height:0; margin-bottom:12px; }
  .product-card>.muted { font-size:15px; line-height:1.8; min-height:0; margin-bottom:24px; max-width:none; }
  .prompt-demo,.code-demo { transform:none; margin-bottom:22px; }
  .prompt-demo { padding:16px 14px 0; }
  .demo-label { font-size:9px; line-height:1.5; letter-spacing:.3px; flex-wrap:wrap; gap:6px; }
  .prompt-demo>p,.prompt-refined p { font-size:14px; line-height:1.75; }
  .prompt-demo>p { padding-block:12px 18px; }
  .prompt-refined { padding:16px 14px; min-height:0; }
  .prompt-refined .demo-label>span:last-child { display:block; font-size:8px; }
  .prompt-tags { gap:6px; }
  .prompt-tags span { font-size:10px; line-height:1.5; padding:3px 6px; }
  .code-toolbar { padding:13px; font-size:9px; gap:10px; }
  .code-body { padding:18px 16px; font-size:13px; line-height:1.8; }
  .code-body>p { display:flex; flex-wrap:wrap; column-gap:0; }
  .code-line { width:24px; margin-right:12px; flex-shrink:0; }
  .code-comment { font-size:11px; line-height:1.8; margin-block:18px; overflow-wrap:anywhere; }
  .code-footer { font-size:12px; line-height:1.8; padding-top:16px; }
  .product-link { min-height:60px; padding-block:18px; gap:18px; font-size:14px; }
  .product-link span { flex-shrink:0; }

  .solutions-grid { grid-template-columns:minmax(0,1fr); }
  .solutions-grid article,.solutions-grid article:first-child,.solutions-grid article:last-child { padding:30px 0; border:0; border-bottom:1px solid #302d28; }
  .solutions-grid article:first-child { padding-top:5px; }
  .solutions-grid article:last-child { border:0; padding-bottom:0; }
  .solution-icon { margin-bottom:26px; }
  .small-label { font-size:10px; line-height:1.6; }
  .solutions-grid h3 { font-size:26px; line-height:1.3; }
  .solutions-grid p { font-size:15px; line-height:1.8; max-width:550px; margin-bottom:14px; }
  .text-link,.solutions-grid .text-link { font-size:14px; line-height:1.6; min-height:44px; gap:18px; }
  .text-link span { flex-shrink:0; }
  .approach-grid,.company-grid,.faq-grid { grid-template-columns:minmax(0,1fr); gap:30px; }
  .approach-intro>p:not(.eyebrow) { font-size:15px; line-height:1.8; max-width:550px; margin-top:22px; }
  .workflow-art { margin:18px auto 4px; width:min(100%,320px); }
  .workflow-scene { height:200px; }
  .workflow-art figcaption { font-size:11px; }
  .principles { padding:0; }
  .principles article { gap:16px; padding:26px 0; }
  .principles article>span { font-size:11px; padding-top:7px; }
  .principles h3 { font-size:22px; line-height:1.4; }
  .principles p { font-size:15px; line-height:1.8; max-width:none; }
  .principles article>b { flex-shrink:0; }
  .company-description,.company-grid .muted { font-size:15px; line-height:1.8; max-width:550px; }
  .company-details { padding:24px; transform:none; box-shadow:5px 5px 0 #020202; }
  .company-details-top { font-size:10px; line-height:1.5; gap:10px; }
  .company-details dl>div { grid-template-columns:90px minmax(0,1fr); font-size:14px; line-height:1.7; gap:16px; padding-top:20px; }
  .company-details dd { overflow-wrap:anywhere; }
  .company-details dd a { display:inline-flex; min-height:44px; align-items:center; }
  .faq-list summary { min-height:64px; font-size:15px; line-height:1.65; padding-block:20px; }
  .faq-list summary>span { flex-shrink:0; }
  .faq-list details p { font-size:15px; line-height:1.8; max-width:none; }
  .contact-section { padding-block:56px; }
  .contact-inner { flex-direction:column; align-items:stretch; gap:26px; }
  .contact-inner .eyebrow { font-size:10px; }
  .contact-inner h2 { font-size:clamp(32px,5.8vw,40px); line-height:1.15; }
  .contact-inner p:last-child { font-size:15px; line-height:1.8; }
  .contact-inner>.button { min-height:52px; width:100%; max-width:480px; justify-content:space-between; font-size:15px; }
  .site-footer { padding-top:42px; padding-bottom:env(safe-area-inset-bottom,0px); }
  .footer-top { grid-template-columns:1fr 1fr; gap:30px 24px; padding-bottom:30px; }
  .footer-brand,.footer-column:last-child { grid-column:1/-1; }
  .footer-brand .brand { font-size:18px; min-height:44px; }
  .footer-brand p { font-size:14px; margin-top:4px; }
  .footer-column { gap:0; }
  .footer-column h3 { font-size:13px; margin-bottom:10px; }
  .footer-column a { display:flex; align-items:center; min-height:44px; font-size:14px; }
  .footer-bottom { font-size:12px; line-height:1.7; align-items:flex-start; gap:16px; padding-block:22px; }
  .footer-bottom>span { max-width:250px; }
  .footer-bottom>a { display:flex; align-items:center; white-space:nowrap; min-height:44px; }

  .contact-dialog { width:min(560px,calc(100% - 24px)); bottom:var(--dialog-bottom,0px); max-height:calc(var(--dialog-viewport,100dvh) - 24px - env(safe-area-inset-top,0px)); margin:auto; padding:24px; border-radius:18px; overflow-y:auto; overscroll-behavior:contain; scroll-padding-block:20px; }
  .dialog-close { position:sticky; float:right; top:0; right:auto; margin:-8px -8px 4px 10px; min-width:44px; height:44px; background:#211f1a; border-radius:50%; z-index:2; }
  .contact-dialog .eyebrow { font-size:10px; margin-bottom:14px; padding-top:5px; }
  .contact-dialog h2 { font-size:30px; line-height:1.15; max-width:none; margin:0 0 16px; }
  .contact-dialog h2:focus { outline:none; }
  .contact-dialog .muted { font-size:14px; line-height:1.75; margin-bottom:22px; }
  .contact-dialog form { grid-template-columns:minmax(0,1fr); gap:18px; clear:both; }
  .contact-dialog label { font-size:13px; line-height:1.5; }
  .contact-dialog input,.contact-dialog select,.contact-dialog textarea { font-size:16px; line-height:1.5; padding:12px; min-height:48px; margin-top:7px; }
  .contact-dialog textarea { min-height:120px; }
  .form-note { font-size:12px; line-height:1.75; }
  .contact-dialog form>.button { min-height:52px; font-size:15px; }
  .form-feedback,.dialog-email { font-size:13px; line-height:1.8; }
  .dialog-email a { display:inline-flex; align-items:center; min-height:44px; }
  html:not(.js) .site-header { position:static; }
  html:not(.js) .nav { height:auto; flex-wrap:wrap; padding-top:16px; }
  html:not(.js) .menu-toggle { display:none; }
  html:not(.js) .nav-content { display:block; position:static; flex-basis:100%; padding:0 0 24px; max-height:none; border:0; }
}

@media screen and (max-width:540px) {
  .container { width:calc(100% - 40px); }
  .hero-grid { padding-top:34px; gap:8px; }
  .hero-copy .eyebrow { font-size:9px; letter-spacing:.75px; }
  .hero-art { height:clamp(350px,107vw,460px); }
  .hero-footer>div { display:grid; grid-template-columns:1fr; gap:10px; font-size:12px; }
  .product-card { padding:22px 20px 0; }
  .product-meta { align-items:flex-start; }
  .product-category { font-size:9px; padding-top:5px; }
  .status,.status.available { font-size:10px; }
  .code-body { font-size:12px; padding-inline:14px; }
  .code-line { width:20px; margin-right:9px; }
  .company-details { padding:22px 20px; }
  .company-details dl>div { grid-template-columns:1fr; gap:5px; }
  .company-details dt { font-size:12px; }
  .company-details dd { font-size:15px; }
  .footer-bottom { flex-direction:column; gap:6px; }
  .footer-bottom>span { max-width:none; }
  .contact-dialog { margin: auto 8px 8px; width:calc(100% - 16px); max-height:calc(var(--dialog-viewport,100dvh) - 16px - env(safe-area-inset-top,0px)); padding:24px 20px max(20px,env(safe-area-inset-bottom,0px)); }
}

@media screen and (max-width:359px) {
  .container { width:calc(100% - 32px); }
  .hero-copy .eyebrow { font-size:8px; letter-spacing:.5px; }
  .button-row { grid-template-columns:minmax(0,1fr); gap:10px; }
  .hero .button { padding-inline:18px; }
  .scene-label { padding:9px 10px; font-size:11px; }
  .scene-label small { font-size:7px; letter-spacing:.3px; }
  .section-heading h2,h2,.company-grid h2,.faq-grid h2 { font-size:31px; }
  .product-card { padding-inline:16px; }
  .product-meta { gap:7px; }
  .product-category { font-size:8px; letter-spacing:.2px; }
  .status,.status.available { font-size:9px; padding-inline:6px; }
  .prompt-demo { padding-inline:10px; }
  .prompt-refined { padding-inline:10px; }
  .code-body { font-size:11px; padding-inline:10px; }
  .code-line { width:15px; margin-right:7px; }
}

@media screen and (max-width:900px) and (max-height:500px) and (orientation:landscape) {
  .hero-grid { padding-top:28px; }
  .hero-art { height:400px; max-width:600px; margin-inline:auto; }
  .contact-dialog { width:min(620px,calc(100% - 32px)); margin:auto; max-height:calc(var(--dialog-viewport,100dvh) - 20px); }
}
