/*
Theme Name: The Home You Need Orbital
Theme URI: https://thehomeyouneed.com/
Author: The Home You Need
Description: Tema editorial de estilo Orbital para un portal español de casas prefabricadas y guías de compra.
Version: 1.2.0
Text Domain: thyn-orbital
*/

:root {
  --ink: #191815;
  --muted: #6d6961;
  --paper: #fffefb;
  --soft: #f3f0e9;
  --line: #ded9cf;
  --orange: #f28b18;
  --orange-dark: #cf6905;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; }
.site-shell { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  width: auto; height: auto; clip: auto; margin: 0; padding: 12px 16px;
  top: 12px; left: 12px; z-index: 1000; background: var(--ink); color: #fff;
}
.orbital-bar { height: 8px; background: var(--orange); }
.site-header {
  position: sticky; top: 0; z-index: 30; background: rgba(255,254,251,.96);
  border-bottom: 1px solid var(--line); backdrop-filter: blur(14px);
}
.header-inner { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 900; letter-spacing: .06em; line-height: .95; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; background: var(--orange); color: #fff; font-size: 23px; }
.brand-text { font-size: 14px; }
.brand-text small { display: block; margin-top: 6px; color: var(--orange-dark); font-size: 10px; letter-spacing: .14em; }
.main-nav { display: flex; align-items: center; gap: 28px; font-size: 14px; font-weight: 750; }
.main-nav a { padding: 8px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a:focus { border-color: var(--orange); }
.mobile-menu { display: none; position: relative; }
.mobile-menu summary { cursor: pointer; list-style: none; font-weight: 850; }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu summary::after { content: " +"; color: var(--orange-dark); }
.mobile-menu[open] summary::after { content: " −"; }
.mobile-menu nav {
  position: absolute; top: calc(100% + 20px); right: 0; width: min(280px, calc(100vw - 28px));
  padding: 10px; border: 1px solid var(--line); background: var(--paper);
  box-shadow: 0 18px 45px rgba(25,24,21,.16);
}
.mobile-menu nav a { display: block; padding: 13px 12px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 800; }
.mobile-menu nav a:last-child { border-bottom: 0; }
.mobile-menu nav a:hover, .mobile-menu nav a:focus { color: var(--orange-dark); }

.hero { padding: 72px 0 40px; }
.eyebrow, .card-kicker, .post-meta {
  margin: 0 0 12px; color: var(--orange-dark); font-size: 12px;
  font-weight: 850; letter-spacing: .14em; text-transform: uppercase;
}
.hero h1 { max-width: 900px; margin: 0; font-size: clamp(48px, 7vw, 90px); line-height: .94; letter-spacing: -.065em; }
.hero-lead { max-width: 720px; margin: 28px 0 0; color: var(--muted); font-size: clamp(18px, 2vw, 23px); line-height: 1.55; }
.feature-grid { display: grid; grid-template-columns: 1.55fr 1fr; grid-template-rows: repeat(2, 255px); gap: 14px; }
.feature-card { position: relative; overflow: hidden; background: #312e29; color: #fff; isolation: isolate; }
.feature-card--main { grid-row: 1 / span 2; }
.feature-card img { height: 100%; object-fit: cover; transition: transform .65s ease; }
.feature-card:hover img { transform: scale(1.035); }
.feature-overlay { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 20%, rgba(0,0,0,.2) 48%, rgba(0,0,0,.92)); }
.feature-content { position: absolute; inset: auto 0 0; z-index: 2; padding: 30px; }
.feature-content .card-kicker { color: #ffba70; }
.feature-content h2 { max-width: 680px; margin: 0; font-size: clamp(24px, 3vw, 43px); line-height: 1.04; letter-spacing: -.04em; }
.feature-card:not(.feature-card--main) .feature-content { padding: 23px; }
.feature-card:not(.feature-card--main) h2 { font-size: clamp(21px, 2vw, 28px); }
.feature-link { display: inline-block; margin-top: 16px; padding-bottom: 3px; border-bottom: 1px solid rgba(255,255,255,.65); font-size: 13px; font-weight: 800; }

.decision-path { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 18px; border: 1px solid var(--line); }
.decision-item { padding: 28px; border-right: 1px solid var(--line); }
.decision-item:last-child { border-right: 0; }
.decision-number { color: var(--orange-dark); font-size: 12px; font-weight: 900; letter-spacing: .12em; }
.decision-item h3 { margin: 10px 0 8px; font-size: 21px; letter-spacing: -.025em; }
.decision-item p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

.content-layout { display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 70px; padding: 90px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding-bottom: 20px; margin-bottom: 30px; border-bottom: 3px solid var(--ink); }
.section-head h2, .sidebar-box h2, .amazon-section h2, .cta-band h2 { margin: 0; font-size: clamp(31px, 4vw, 48px); line-height: 1; letter-spacing: -.045em; }
.section-head a { font-size: 14px; font-weight: 800; }
.guide-list { display: grid; gap: 30px; }
.guide-card { display: grid; grid-template-columns: 280px minmax(0,1fr); gap: 28px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.guide-image { min-height: 210px; overflow: hidden; background: var(--soft); }
.guide-image img { height: 100%; object-fit: cover; transition: transform .55s ease; }
.guide-card:hover .guide-image img { transform: scale(1.035); }
.guide-copy h3 { margin: 0; font-size: clamp(23px, 3vw, 31px); line-height: 1.08; letter-spacing: -.035em; }
.guide-copy p:not(.card-kicker) { color: var(--muted); line-height: 1.6; }
.text-link { font-size: 13px; font-weight: 850; color: var(--orange-dark); }
.sidebar { align-self: start; position: sticky; top: 120px; }
.sidebar-box { padding: 28px; border-top: 8px solid var(--orange); background: var(--soft); }
.sidebar-box h2 { font-size: 31px; }
.sidebar-list { margin: 24px 0 0; padding: 0; list-style: none; }
.sidebar-list li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; padding: 17px 0; border-top: 1px solid #d5cfc3; }
.sidebar-list span { color: var(--orange-dark); font-size: 11px; font-weight: 900; }
.sidebar-list a { font-size: 15px; font-weight: 750; line-height: 1.35; }
.editorial-note { margin-top: 18px; padding: 26px; border: 1px solid var(--line); }
.editorial-note p { margin: 0; font-family: Georgia, serif; font-size: 18px; font-style: italic; line-height: 1.55; }

.amazon-section { padding: 78px 0; background: #ece8de; }
.amazon-intro { max-width: 730px; color: var(--muted); line-height: 1.65; }
.amazon-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.amazon-card { padding: 26px; background: var(--paper); border-bottom: 4px solid var(--orange); }
.amazon-card h3 { margin: 0 0 10px; font-size: 21px; }
.amazon-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.cta-band { background: var(--ink); color: #fff; }
.cta-inner { min-height: 275px; display: flex; align-items: center; justify-content: space-between; gap: 50px; }
.cta-band .eyebrow { color: #ffb86c; }
.cta-band h2 { max-width: 720px; font-size: clamp(36px, 5vw, 60px); }
.button { flex: 0 0 auto; padding: 17px 22px; background: var(--orange); color: var(--ink); font-weight: 900; }
.button:hover, .button:focus { background: #ffad51; }

.site-footer { padding: 48px 0; background: #0f0e0d; color: #fff; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 30px; }
.footer-copy { max-width: 620px; margin: 20px 0 0; color: #aaa49a; font-size: 13px; line-height: 1.6; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 22px; color: #d2cdc4; font-size: 12px; font-weight: 750; }
.footer-links a:hover, .footer-links a:focus { color: #fff; }
.footer-meta { color: #aaa49a; font-size: 12px; text-align: right; }

.article-wrap { width: min(calc(100% - 40px), 820px); margin: 70px auto; }
.article-wrap h1 { font-size: clamp(38px, 6vw, 68px); line-height: 1; letter-spacing: -.05em; }
.entry-content { font-size: 18px; line-height: 1.75; }
.entry-content a { color: var(--orange-dark); text-decoration: underline; }
.entry-content h2 { margin: 54px 0 18px; font-size: clamp(30px, 4vw, 44px); line-height: 1.05; letter-spacing: -.04em; }
.entry-content h3 { margin: 38px 0 14px; font-size: 25px; letter-spacing: -.025em; }
.entry-content img { height: auto; margin: 32px 0; }
.single-article-head { padding-top: 70px; padding-bottom: 42px; }
.single-article-head h1 { max-width: 950px; margin: 12px 0 0; font-size: clamp(44px, 7vw, 78px); line-height: .98; letter-spacing: -.055em; }
.single-excerpt { max-width: 760px; margin: 25px 0 0; color: var(--muted); font-family: Georgia, serif; font-size: 22px; line-height: 1.55; }
.back-link { display: inline-block; margin-bottom: 25px; color: var(--orange-dark); font-size: 13px; font-weight: 850; }
.single-featured { width: min(calc(100% - 40px), 1180px); height: clamp(320px, 52vw, 620px); margin: 0 auto; overflow: hidden; background: var(--soft); }
.single-featured img { height: 100%; object-fit: cover; }
.single-related { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; margin-top: 0; padding: 25px; border-left: 6px solid var(--orange); background: var(--soft); font-size: 14px; }
.single-related a { color: var(--orange-dark); font-weight: 800; }

.page-hero { padding: 68px 0 38px; }
.page-hero h1 { max-width: 900px; margin: 0; font-size: clamp(46px, 7vw, 84px); line-height: .94; letter-spacing: -.06em; }
.page-hero p:last-child { max-width: 760px; margin: 25px 0 0; color: var(--muted); font-size: 20px; line-height: 1.6; }
.page-cover { position: relative; height: clamp(300px, 42vw, 480px); overflow: hidden; background: var(--soft); }
.page-cover img { height: 100%; object-fit: cover; }
.page-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.5)); }
.page-content { padding: 72px 0 95px; }
.page-section-head { max-width: 800px; margin-bottom: 34px; }
.page-section-head h2 { margin: 0; font-size: clamp(32px, 4vw, 50px); line-height: 1; letter-spacing: -.045em; }
.page-section-head p:last-child { color: var(--muted); line-height: 1.65; }
.selection-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.selection-card { display: flex; flex-direction: column; min-height: 330px; padding: 26px; border: 1px solid var(--line); background: #fff; }
.selection-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 24px; background: var(--orange); color: #fff; font-size: 23px; font-weight: 900; }
.selection-card h3 { margin: 0; font-size: 23px; line-height: 1.12; letter-spacing: -.03em; }
.selection-card p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.selection-points { margin: 4px 0 24px; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.selection-card .amazon-button { margin-top: auto; align-self: flex-start; padding: 12px 15px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 850; }
.selection-card .amazon-button:hover, .selection-card .amazon-button:focus { background: var(--orange-dark); }
.buying-note { margin-top: 38px; padding: 25px 28px; border-left: 6px solid var(--orange); background: var(--soft); color: var(--muted); font-size: 14px; line-height: 1.65; }
.article-block { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; margin-top: 72px; padding-top: 60px; border-top: 1px solid var(--line); }
.article-block h2 { margin: 0; font-size: clamp(30px, 4vw, 46px); line-height: 1.02; letter-spacing: -.04em; }
.article-block p, .article-block li { color: var(--muted); line-height: 1.7; }

.seo-article { max-width: 860px; margin: 92px auto 0; padding-top: 72px; border-top: 3px solid var(--ink); }
.seo-article-head h2 { margin: 0; font-size: clamp(38px, 5vw, 62px); line-height: .98; letter-spacing: -.052em; }
.article-lead { margin: 28px 0 0; color: var(--muted); font-family: Georgia, serif; font-size: clamp(20px, 2.2vw, 25px); line-height: 1.6; }
.article-toc { display: grid; grid-template-columns: 1.2fr repeat(5, auto); align-items: center; gap: 12px 20px; margin: 42px 0 62px; padding: 22px 24px; background: var(--soft); font-size: 13px; }
.article-toc strong { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.article-toc a { color: var(--orange-dark); font-weight: 800; }
.article-toc a:hover, .article-toc a:focus { text-decoration: underline; }
.article-section { scroll-margin-top: 120px; margin-top: 58px; }
.article-section + .article-section { padding-top: 58px; border-top: 1px solid var(--line); }
.article-section h2 { margin: 0 0 22px; font-size: clamp(30px, 4vw, 44px); line-height: 1.06; letter-spacing: -.04em; }
.article-section h3 { margin: 34px 0 12px; font-size: 24px; letter-spacing: -.025em; }
.article-section p, .article-section li { color: #514d46; font-size: 17px; line-height: 1.78; }
.check-list { margin: 24px 0; padding-left: 23px; }
.check-list li { margin-bottom: 12px; padding-left: 5px; }
.related-links { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 16px; margin-top: 66px; padding: 25px; border-left: 6px solid var(--orange); background: var(--soft); }
.related-links a { color: var(--orange-dark); font-size: 14px; font-weight: 850; }
.inline-link { color: var(--orange-dark); font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }
.guide-article { margin-top: 0; padding-top: 0; border-top: 0; }

.blog-hero { padding-bottom: 58px; }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.blog-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); background: #fff; }
.blog-card--featured { grid-column: span 2; }
.blog-card-image { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--soft); }
.blog-card--featured .blog-card-image { aspect-ratio: 16 / 8; }
.blog-card-image img { height: 100%; object-fit: cover; transition: transform .5s ease; }
.blog-card:hover .blog-card-image img { transform: scale(1.025); }
.blog-card-copy { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 25px; }
.blog-card-copy h2 { margin: 0; font-size: 25px; line-height: 1.08; letter-spacing: -.035em; }
.blog-card--featured .blog-card-copy h2 { font-size: clamp(28px, 3vw, 39px); }
.blog-card-copy > p:not(.card-kicker):not(.blog-meta) { color: var(--muted); line-height: 1.6; }
.blog-card-copy .text-link { margin-top: auto; padding-top: 8px; }
.blog-meta { margin: 0 0 12px; color: var(--muted); font-size: 12px; }
.blog-meta a { color: var(--orange-dark); }
.blog-latest-head { margin-top: 84px; }
.blog-empty { padding: 42px; border-left: 6px solid var(--orange); background: var(--soft); }
.blog-empty h3 { margin: 0 0 10px; font-size: 27px; }
.blog-empty p { margin: 0; color: var(--muted); }
.pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 38px; }
.pagination .page-numbers { padding: 10px 13px; border: 1px solid var(--line); font-size: 13px; font-weight: 800; }
.pagination .current { background: var(--ink); color: #fff; }

@media (max-width: 900px) {
  .main-nav { display: none; }
  .mobile-menu { display: block; }
  .content-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .editorial-note { margin: 0; }
  .amazon-grid { grid-template-columns: 1fr; }
  .selection-grid { grid-template-columns: 1fr 1fr; }
  .article-toc { grid-template-columns: 1fr 1fr; }
  .article-toc strong { grid-column: 1 / -1; }
  .related-links { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr 1fr; }
  .blog-card--featured { grid-column: span 2; }
  .single-related { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .site-shell { width: min(calc(100% - 28px), var(--max)); }
  .header-inner { min-height: 74px; }
  .hero { padding: 50px 0 30px; }
  .feature-grid { grid-template-columns: 1fr; grid-template-rows: 410px repeat(2, 255px); }
  .feature-card--main { grid-row: auto; }
  .feature-content, .feature-card:not(.feature-card--main) .feature-content { padding: 21px; }
  .feature-content h2, .feature-card:not(.feature-card--main) h2 { font-size: 27px; }
  .decision-path { grid-template-columns: 1fr; }
  .decision-item { border-right: 0; border-bottom: 1px solid var(--line); }
  .decision-item:last-child { border-bottom: 0; }
  .content-layout { padding: 65px 0; }
  .guide-card { grid-template-columns: 1fr; gap: 19px; }
  .guide-image { min-height: 245px; }
  .sidebar { grid-template-columns: 1fr; }
  .cta-inner { min-height: 360px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 32px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-meta { text-align: left; }
  .selection-grid, .article-block { grid-template-columns: 1fr; }
  .page-hero { padding-top: 48px; }
  .page-cover { height: 280px; }
  .seo-article { margin-top: 70px; padding-top: 52px; }
  .article-toc { grid-template-columns: 1fr; margin-bottom: 48px; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-card--featured { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
