Make the marketing site actually mobile-friendly
The only responsive rule in the whole file was a single @media(max-width: 900px) block that stacked the 2-column grids -- no mobile nav at all (logo + 3 links + Sign in + CTA button all competing for one flex row, no wrap, no hamburger), and nothing tuned for real phone widths. Adds a mobile nav using the file's own established pattern (the FAQ accordion already uses a native <details>/<summary> disclosure, no JS) -- a hamburger toggle that collapses into a dropdown menu below 900px, alongside the existing nav collapsing there too. Adds a second, tighter breakpoint at 560px for actual phone widths: reduced section padding, hero padding, price-card sizing, contact form stacking to a single column, tighter footer spacing. Fixed one real bug caught during verification: .nav-toggle-menu a's color rule had higher specificity than .nav-cta's own color:#fff and silently overrode it, making the mobile menu's CTA button nearly illegible (dark text on dark background) -- confirmed via getComputedStyle, not just visual inspection, before and after. Verified live in a real narrow viewport (confirmed via window.innerWidth, not just a resized window that may not reflect the actual page viewport): nav collapses and reopens correctly, no horizontal overflow at any width, every section (hero, flows, features, pricing, why, FAQ, contact, footer) stacks cleanly with no overlap. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012pc2x7vyuUofdT3kLuqF3Y
This commit is contained in:
parent
f208783596
commit
f75cb61d08
|
|
@ -31,7 +31,15 @@ ul{list-style:none;}
|
|||
|
||||
/* NAV */
|
||||
.nav-outer{position:sticky;top:0;z-index:100;background:rgba(255,255,255,.93);backdrop-filter:blur(14px);border-bottom:1px solid var(--border);}
|
||||
.nav{max-width:1100px;margin:0 auto;padding:14px 28px;display:flex;align-items:center;justify-content:space-between;}
|
||||
.nav{max-width:1100px;margin:0 auto;padding:14px 28px;display:flex;align-items:center;justify-content:space-between;position:relative;}
|
||||
.nav-toggle{display:none;}
|
||||
.nav-toggle-btn{cursor:pointer;display:flex;align-items:center;justify-content:center;width:40px;height:40px;color:var(--navy);list-style:none;border-radius:8px;}
|
||||
.nav-toggle-btn::-webkit-details-marker{display:none;}
|
||||
.nav-toggle-btn:hover{background:var(--surface-2);}
|
||||
.nav-toggle-menu{position:absolute;top:100%;left:0;right:0;background:var(--surface);border-bottom:1px solid var(--border);box-shadow:var(--shadow-h);display:flex;flex-direction:column;padding:12px 28px 20px;gap:2px;}
|
||||
.nav-toggle-menu a{padding:12px 0;font-size:15px;font-weight:500;color:var(--t2);border-bottom:1px solid var(--border);}
|
||||
.nav-toggle-menu a:last-child{border-bottom:none;}
|
||||
.nav-toggle-menu .nav-cta{margin-top:10px;justify-content:center;border-bottom:none;padding:14px;color:#fff;}
|
||||
.logo{display:flex;align-items:center;gap:0px;}
|
||||
.logo-mark{width:52.5px;height:52.5px;display:flex;align-items:center;justify-content:center;}
|
||||
.logo-mark img{width:100%;height:100%;object-fit:contain;}
|
||||
|
|
@ -217,6 +225,30 @@ ul{list-style:none;}
|
|||
.hero-visual{padding:40px 0 0;}
|
||||
.hero-copy{padding-bottom:0;}
|
||||
.custody-panel{border-radius:12px;border-bottom:1px solid rgba(255,255,255,.10);}
|
||||
.nav-links,.nav-right{display:none;}
|
||||
.nav-toggle{display:block;}
|
||||
}
|
||||
|
||||
@media(max-width:560px){
|
||||
.wrap{padding:0 20px;}
|
||||
.nav{padding:12px 20px;}
|
||||
.nav-toggle-menu{padding:12px 20px 18px;}
|
||||
.hero-inner{padding:56px 20px 0;}
|
||||
.hero-h1{margin-bottom:18px;}
|
||||
.hero-sub{max-width:none;}
|
||||
.cta-row{flex-direction:column;align-items:stretch;}
|
||||
.cta-row a{justify-content:center;}
|
||||
.story,.flows,.features,.compare,.pricing,.why,.faq{padding:56px 0;}
|
||||
.story-grid,.why-grid{gap:40px;}
|
||||
.section-sub{margin-bottom:32px;}
|
||||
.price-card{padding:28px 22px;}
|
||||
.price-tag{font-size:2.4rem;}
|
||||
.contact{padding:64px 0;}
|
||||
.contact-form{flex-direction:column;}
|
||||
.contact-input{min-width:0;}
|
||||
.footer{padding:40px 20px 0;}
|
||||
.footer-inner{gap:28px;}
|
||||
.footer-bottom-inner{padding:0 20px;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
|
@ -245,6 +277,18 @@ ul{list-style:none;}
|
|||
<a href="https://sample.box.bettersight.io/login" class="signin">Sign in</a>
|
||||
<a href="#contact" class="nav-cta">Talk to us</a>
|
||||
</div>
|
||||
<details class="nav-toggle">
|
||||
<summary class="nav-toggle-btn" aria-label="Menu">
|
||||
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"><path d="M3 6h14M3 10h14M3 14h14"/></svg>
|
||||
</summary>
|
||||
<div class="nav-toggle-menu">
|
||||
<a href="#features">Features</a>
|
||||
<a href="#pricing">Pricing</a>
|
||||
<a href="#faq">FAQ</a>
|
||||
<a href="https://sample.box.bettersight.io/login">Sign in</a>
|
||||
<a href="#contact" class="nav-cta">Talk to us →</a>
|
||||
</div>
|
||||
</details>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue