/*
Theme Name: ontheweb
Theme URI: https://example.com/ontheweb
Author: Your Name
Author URI: https://example.com
Description: A modern news and magazine theme for the ontheweb blog.
Version: 1.0.1
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: ontheweb
*/

:root {
  --paper: #ffffff;
  --paper-deep: #edf7fb;
  --ink: #071b41;
  --muted: #53657f;
  --line: rgba(7, 27, 65, .18);
  --coral: #08a7cf;
  --coral-dark: #087aa8;
  --lime: #ff9d16;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Trebuchet MS', 'Gill Sans', sans-serif;
  --max-width: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.6; overflow-x: hidden; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--coral-dark); }
img { display: block; height: auto; max-width: 100%; }
button, input, textarea { font: inherit; }
.site-shell { overflow: hidden; }
.container { margin: 0 auto; max-width: var(--max-width); padding: 0 clamp(20px, 4vw, 40px); width: 100%; }
.skip-link { background: var(--ink); color: var(--paper); left: 10px; padding: 8px 12px; position: absolute; top: -100px; z-index: 99; }
.skip-link:focus { top: 10px; }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner { align-items: center; display: flex; justify-content: space-between; min-height: 82px; }
.custom-logo-link { display: block; max-width: min(220px, 42vw); }
.custom-logo { max-height: 70px; object-fit: contain; width: auto; }
.site-branding a { align-items: center; display: flex; font-size: 20px; font-weight: 700; gap: 10px; letter-spacing: .04em; text-decoration: none; text-transform: uppercase; }
.brand-mark { background: var(--coral); border-radius: 50%; display: inline-block; height: 14px; width: 14px; }
.site-description { color: var(--muted); font-size: 12px; margin: 0; }
.main-navigation ul { display: flex; gap: 25px; list-style: none; margin: 0; padding: 0; }
.main-navigation a { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-decoration: none; text-transform: uppercase; }
.menu-toggle { align-items: center; background: var(--paper); border: 1px solid var(--ink); border-radius: 4px; cursor: pointer; display: none; flex-direction: column; gap: 4px; justify-content: center; padding: 7px 10px; width: 44px; }
.menu-toggle span { background: var(--ink); display: block; height: 2px; width: 20px; }
.menu-toggle:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
.category-navigation { border-top: 1px solid var(--line); }
.category-navigation ul { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; margin: 0; padding: 11px 0; }
.category-navigation a { color: var(--muted); font-size: 12px; font-weight: 700; text-decoration: none; text-transform: uppercase; }
.category-navigation a:hover, .category-navigation .current-cat a { color: var(--coral-dark); }
.category-navigation .container { overflow: hidden; }

.hero { padding: 100px 0 92px; position: relative; }
.hero:after { background: var(--lime); content: ''; height: 18px; position: absolute; right: 7%; top: 38%; transform: rotate(-8deg); width: 120px; }
.eyebrow { color: var(--coral-dark); font-size: 12px; font-weight: 700; letter-spacing: .16em; margin: 0 0 18px; text-transform: uppercase; }
.hero h1 { font-family: var(--serif); font-size: clamp(52px, 8vw, 112px); font-weight: 400; letter-spacing: -.06em; line-height: .95; margin: 0; max-width: 850px; }
.hero h1 em { color: var(--coral); font-style: normal; }
.hero-intro { font-size: 20px; margin: 34px 0 0; max-width: 500px; }
.hero-actions { align-items: center; display: flex; gap: 24px; margin-top: 34px; }
.button { background: var(--ink); color: var(--paper); display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .08em; padding: 14px 20px; text-decoration: none; text-transform: uppercase; }
.button:hover { background: var(--coral); color: var(--paper); }
.text-link { font-size: 13px; font-weight: 700; text-decoration-thickness: 2px; }

.section { padding: 82px 0; }
.section-header { align-items: end; border-top: 1px solid var(--line); display: flex; justify-content: space-between; padding-top: 18px; }
.section-title { font-family: var(--serif); font-size: clamp(36px, 5vw, 64px); font-weight: 400; letter-spacing: -.05em; line-height: 1; margin: 0; }
.section-note { color: var(--muted); font-size: 13px; margin: 0; max-width: 220px; }
.featured-grid { display: grid; gap: 28px; grid-template-columns: 1.45fr 1fr; margin-top: 42px; }
.project-card { background: var(--paper-deep); min-height: 340px; padding: 28px; position: relative; }
.project-card:first-child { background: var(--coral); color: var(--paper); min-height: 520px; }
.project-card:nth-child(2) { background: var(--ink); color: var(--paper); }
.project-card:nth-child(3) { background: var(--lime); grid-column: 2; margin-top: -210px; min-height: 250px; }
.project-number { font-size: 12px; font-weight: 700; letter-spacing: .1em; }
.project-card h3 { bottom: 26px; font-family: var(--serif); font-size: clamp(30px, 4vw, 54px); font-weight: 400; left: 28px; letter-spacing: -.05em; line-height: .95; margin: 0; max-width: 440px; position: absolute; }
.project-card:nth-child(2) h3, .project-card:nth-child(3) h3 { font-size: clamp(28px, 3vw, 42px); }
.project-tag { border: 1px solid currentColor; display: inline-block; font-size: 11px; letter-spacing: .08em; padding: 5px 8px; text-transform: uppercase; }

.intro-band { background: var(--ink); color: var(--paper); padding: 92px 0; }
.intro-band .section-title { max-width: 820px; }
.intro-band .section-title em { color: var(--coral); font-style: normal; }
.services { display: grid; gap: 1px; grid-template-columns: repeat(3, 1fr); margin-top: 52px; }
.service { border-top: 1px solid rgba(244,240,232,.3); padding: 20px 20px 0 0; }
.service h3 { font-size: 17px; margin: 0 0 8px; }
.service p { color: #b6b9af; font-size: 14px; margin: 0; }

.post-grid { display: grid; gap: 28px; grid-template-columns: repeat(3, 1fr); margin-top: 42px; }
.post-card { border-top: 1px solid var(--line); padding-top: 16px; }
.post-card-image, .story-image { display: block; margin: 0 0 16px; overflow: hidden; }
.post-card-image img, .story-image img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.story-image { margin: -14px -0px 16px; }
.story-image img { aspect-ratio: 16 / 8; }
.story-label a { color: inherit; text-decoration: none; }
.post-meta + .post-meta { margin-left: 10px; }
.post-card h3 { font-family: var(--serif); font-size: 27px; font-weight: 400; letter-spacing: -.03em; line-height: 1.08; margin: 12px 0; }
.post-meta { color: var(--muted); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }

.page-header { padding: 82px 0 42px; }
.page-header h1 { font-family: var(--serif); font-size: clamp(48px, 7vw, 92px); font-weight: 400; letter-spacing: -.06em; line-height: .95; margin: 0; }
.content-area { padding-bottom: 90px; }
.entry { max-width: 780px; }
.entry-header { border-bottom: 1px solid var(--line); margin-bottom: 30px; padding-bottom: 20px; }
.entry-title { font-family: var(--serif); font-size: clamp(40px, 6vw, 76px); font-weight: 400; letter-spacing: -.05em; line-height: 1; margin: 0 0 18px; }
.entry-image { margin-top: 28px; }
.entry-image img { width: 100%; }
.entry-content { font-family: var(--serif); font-size: 20px; }
.entry-content h2, .entry-content h3 { font-family: var(--sans); line-height: 1.2; }
.entry-content a { color: var(--coral-dark); }
.entry-content blockquote { border-left: 4px solid var(--coral); margin: 28px 0; padding-left: 22px; }
.entry-content li { margin-bottom: 8px; }

.site-footer { border-top: 1px solid var(--line); padding: 38px 0; }
.footer-inner { align-items: start; display: flex; justify-content: space-between; }
.footer-copy { color: var(--muted); font-size: 13px; margin: 0; }
.footer-menu ul { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; }
.footer-menu a { font-size: 12px; font-weight: 700; text-transform: uppercase; }
.main-navigation li, .category-navigation li { flex: 0 0 auto; }
.main-navigation a, .category-navigation a, .button, .menu-toggle { min-height: 44px; }
.main-navigation a, .category-navigation a { align-items: center; display: inline-flex; }
.screen-reader-text { clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }

@media (max-width: 760px) {
  .container { padding: 0 20px; }
  .header-inner { min-height: 68px; }
  .site-branding { min-width: 0; }
  .site-branding a { font-size: 17px; max-width: 65vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .custom-logo-link { max-width: 58vw; }
  .custom-logo { max-height: 58px; }
  .site-description { display: none; }
  .menu-toggle { display: block; }
  .category-toggle { display: flex !important; }
  .category-navigation { display: none; }
  .category-navigation.is-open { display: block; }
  .category-navigation ul { gap: 4px 18px; margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; }
  .hero { padding: 72px 0 76px; }
  .hero:after { height: 11px; right: 4%; top: 48%; width: 70px; }
  .hero-intro { font-size: 17px; }
  .section, .intro-band { padding: 62px 0; }
  .section-header { align-items: start; display: block; }
  .section-note { margin-top: 15px; }
  .featured-grid, .post-grid { display: block; }
  .project-card, .project-card:first-child, .project-card:nth-child(3) { margin: 0 0 16px; min-height: 300px; }
  .project-card:first-child { min-height: 380px; }
  .services { display: block; }
  .service { padding: 20px 0; }
  .footer-inner { display: block; }
  .footer-menu { margin-top: 18px; }
  .footer-menu ul { flex-wrap: wrap; }
}

@media (max-width: 900px) {
  .header-inner { min-height: 72px; }
  .category-toggle { display: flex !important; }
}

/* News layout */
.news-hero { padding: 72px 0 42px; }
.news-hero h1 { font-family: var(--serif); font-size: clamp(48px, 8vw, 104px); font-weight: 400; letter-spacing: -.07em; line-height: .92; margin: 0; max-width: 940px; }
.news-hero h1 em { color: var(--coral); font-style: normal; }
.news-intro { color: var(--muted); font-size: 18px; margin: 22px 0 0; max-width: 590px; }
.topic-bar { border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); display: flex; gap: 24px; margin-top: 38px; overflow-x: auto; padding: 13px 0; white-space: nowrap; }
.topic-bar a { font-size: 12px; font-weight: 700; text-decoration: none; text-transform: uppercase; }
.story-grid { display: grid; gap: 24px; grid-template-columns: 1.55fr 1fr 1fr; margin-top: 30px; }
.story { border-top: 4px solid var(--ink); padding-top: 14px; }
.story--lead { background: var(--ink); border-top: 0; color: var(--paper); display: flex; flex-direction: column; min-height: 440px; padding: 24px; }
.story--lead .story-title { font-size: clamp(32px, 4vw, 54px); margin-top: auto; }
.story--accent { border-top-color: var(--coral); }
.story-label { color: var(--coral-dark); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.story--lead .story-label { color: var(--lime); }
.story-title { font-family: var(--serif); font-size: clamp(25px, 2.6vw, 38px); font-weight: 400; letter-spacing: -.04em; line-height: 1.02; margin: 18px 0 14px; }
.story-title a { text-decoration: none; }
.story-excerpt { color: var(--muted); font-size: 14px; margin: 0; }
.story--lead .story-excerpt { color: #cbd5e1; }
.story-meta { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.news-section { padding: 74px 0; }
.news-section .section-title { font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.latest-grid { display: grid; gap: 26px; grid-template-columns: repeat(3, 1fr); margin-top: 26px; }
.latest-story { border-top: 1px solid var(--line); padding-top: 15px; }
.latest-story .story-title { font-size: 28px; }
.subscribe-band { background: var(--lime); padding: 56px 0; }
.subscribe-inner { align-items: center; display: flex; gap: 40px; justify-content: space-between; }
.subscribe-band h2 { font-family: var(--serif); font-size: clamp(32px, 4vw, 56px); font-weight: 400; letter-spacing: -.05em; line-height: 1; margin: 0; max-width: 540px; }
.subscribe-band p { margin: 0; max-width: 330px; }
@media (max-width: 860px) {
  .story-grid { grid-template-columns: 1fr 1fr; }
  .story--lead { grid-column: 1 / -1; min-height: 360px; }
}
@media (max-width: 600px) {
  .news-hero { padding-top: 52px; }
  .news-hero h1 { font-size: clamp(44px, 14vw, 72px); max-width: 100%; }
  .news-intro { font-size: 16px; }
  .story-grid, .latest-grid { display: block; }
  .story, .latest-story { margin-bottom: 30px; }
  .story--lead { min-height: 360px; padding: 20px; }
  .subscribe-inner { align-items: start; display: block; }
  .subscribe-band p { margin-top: 18px; }
}

@media (max-width: 1100px) {
  .main-navigation ul { gap: 16px; }
  .featured-grid { gap: 18px; }
}

@media (max-width: 480px) {
  body { font-size: 15px; }
  .header-inner { gap: 12px; }
  .menu-toggle { flex: 0 0 auto; padding: 7px 9px; }
  .hero, .news-hero { padding-bottom: 54px; }
  .hero-actions { align-items: stretch; flex-direction: column; gap: 14px; }
  .hero-actions .button { text-align: center; }
  .section, .intro-band, .news-section { padding: 52px 0; }
  .section-title { font-size: clamp(34px, 11vw, 50px); }
  .page-header { padding: 56px 0 32px; }
  .page-header h1 { font-size: clamp(44px, 13vw, 68px); }
  .entry-title { font-size: clamp(38px, 12vw, 58px); }
  .entry-content { font-size: 18px; }
  .entry-content img, .entry-content iframe, .entry-content video { height: auto; max-width: 100%; }
  .post-meta + .post-meta { display: block; margin-left: 0; margin-top: 4px; }
  .story--lead .story-title { font-size: 34px; }
}
