/*
Theme Name: Time & Case
Theme URI: https://timeandcase.com
Description: Editorial child theme for Time & Case — a warm, print-inspired design layer over Kadence. Colours, typography, spacing and component styling all live here, so nothing needs to be set in the Customizer.
Author: Time & Case
Version: 1.0.0
Template: kadence
Text Domain: timeandcase
*/

/* ==========================================================================
   1. Brand tokens
   Kadence drives almost everything from these nine palette variables, so
   redefining them here re-skins the entire theme — header, buttons, links,
   borders, block colours — without touching the Customizer.
   ========================================================================== */

:root,
body {
  /* Accents */
  --global-palette1: #9A7650;   /* bronze — primary accent, links, buttons */
  --global-palette2: #7D5F40;   /* deeper bronze — hover states */

  /* Text */
  --global-palette3: #1A1A1A;   /* headings, near-black */
  --global-palette4: #242424;   /* body copy */
  --global-palette5: #666666;   /* secondary / meta text */

  /* Lines and grounds */
  --global-palette6: #DCD5C9;   /* rules and borders */
  --global-palette7: #EFEAE2;   /* tinted panels */
  --global-palette8: #F6F3EE;   /* page background, warm off-white */
  --global-palette9: #FFFFFF;   /* cards, base */

  --global-palette9rgb: 255, 255, 255;

  /* Type families */
  --tc-serif: "Cormorant Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --tc-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Editorial measure and rhythm */
  --tc-measure: 68ch;
  --tc-rule: 1px solid var(--global-palette6);

  --global-body-font-family: var(--tc-sans);
  --global-heading-font-family: var(--tc-serif);
  --global-primary-nav-padding: 0;
}

/* ==========================================================================
   2. Base
   ========================================================================== */

body {
  background-color: var(--global-palette8);
  color: var(--global-palette4);
  font-family: var(--tc-sans);
  font-size: 1.0625rem;      /* 17px — comfortable for long-form reading */
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1;
}

.content-bg,
body.content-style-unboxed .content-area,
.entry-content-wrap {
  background-color: transparent;
}

/* ==========================================================================
   3. Typography
   A proper editorial scale. The sizes in the original brief (32/28/24/20)
   read as body copy at display sizes — publications of this kind run far
   larger and lean on the serif to carry the page. These are fluid, so they
   shrink sensibly on a phone without a separate set of mobile rules.
   ========================================================================== */

h1, h2, h3, h4, h5, h6,
.entry-title,
.site-title {
  font-family: var(--tc-serif);
  color: var(--global-palette3);
  font-weight: 600;
  letter-spacing: -0.012em;   /* Cormorant opens up at size; pull it back */
  line-height: 1.16;
  margin-top: 0;
}

h1, .entry-title { font-size: clamp(2.4rem, 1.6rem + 3.3vw, 3.9rem); line-height: 1.08; }
h2 { font-size: clamp(1.85rem, 1.4rem + 1.9vw, 2.6rem); margin-top: 2.6em; }
h3 { font-size: clamp(1.45rem, 1.25rem + 0.85vw, 1.8rem); margin-top: 2.2em; }
h4 { font-size: 1.22rem; margin-top: 2em; letter-spacing: 0; }

h5, h6 {
  font-family: var(--tc-sans);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--global-palette5);
  margin-top: 2em;
}

p { margin: 0 0 1.5em; }

.entry-content > p,
.entry-content > ul,
.entry-content > ol,
.entry-content > h2,
.entry-content > h3,
.entry-content > h4,
.entry-content > blockquote,
.entry-content > figure {
  max-width: var(--tc-measure);
  margin-left: auto;
  margin-right: auto;
}

.entry-content > .alignwide,
.entry-content > .alignfull,
.entry-content > .wp-block-columns,
.entry-content > .wp-block-table {
  max-width: none;
}

/* Opening paragraph of an article gets a lift */
.entry-content > p:first-of-type {
  font-size: 1.2rem;
  line-height: 1.62;
  color: var(--global-palette3);
}

/* ==========================================================================
   4. Links
   ========================================================================== */

.entry-content a:not(.button):not(.wp-block-button__link) {
  color: var(--global-palette3);
  text-decoration: none;
  border-bottom: 1px solid var(--global-palette1);
  padding-bottom: 1px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.entry-content a:not(.button):not(.wp-block-button__link):hover {
  background-color: rgba(154, 118, 80, 0.12);
  border-bottom-color: var(--global-palette2);
}

/* ==========================================================================
   5. Header
   Clean wordmark left, navigation right — no clutter, per the brief.
   ========================================================================== */

#masthead,
.site-header-wrap {
  background-color: var(--global-palette8);
  border-bottom: var(--tc-rule);
}

.site-branding .site-title {
  font-family: var(--tc-serif);
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--global-palette3);
}

.site-branding .site-description {
  font-family: var(--tc-sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.17em;
  color: var(--global-palette5);
  margin-top: 0.35em;
}

.header-navigation .menu > .menu-item > .menu-link,
.primary-menu-container > ul > li > a {
  font-family: var(--tc-sans);
  font-size: 0.79rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--global-palette4);
}

.header-navigation .menu > .menu-item > .menu-link:hover,
.header-navigation .menu > .menu-item.current-menu-item > .menu-link {
  color: var(--global-palette1);
}

/* ==========================================================================
   6. Buttons
   Squared off rather than pill-shaped — pills read consumer-tech, squares
   read editorial.
   ========================================================================== */

.wp-block-button__link,
.button,
input[type="submit"],
.kb-button {
  font-family: var(--tc-sans);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-decoration: none;
  display: inline-block;
  border-radius: 2px;
  padding: 0.95em 2.1em;
  background-color: var(--global-palette3);
  color: var(--global-palette8);
  border: 1px solid var(--global-palette3);
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.wp-block-button__link:hover,
.button:hover,
input[type="submit"]:hover,
.kb-button:hover {
  background-color: var(--global-palette1);
  border-color: var(--global-palette1);
  color: #fff;
}

.wp-block-button.is-style-outline .wp-block-button__link {
  background-color: transparent;
  color: var(--global-palette3);
  border: 1px solid var(--global-palette6);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
  border-color: var(--global-palette3);
  background-color: transparent;
  color: var(--global-palette3);
}

/* ==========================================================================
   7. Article cards and archive listings
   ========================================================================== */

.entry.loop-entry {
  background-color: transparent;
  border: none;
  box-shadow: none;
}

.entry.loop-entry .entry-content-wrap {
  padding: 1.4em 0 0;
}

.loop-entry .entry-title {
  font-size: 1.45rem;
  line-height: 1.22;
  margin-bottom: 0.45em;
}

.loop-entry .entry-taxonomies,
.entry-meta,
.posted-on,
.entry-taxonomies .category-links {
  font-family: var(--tc-sans);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--global-palette5);
}

.loop-entry .post-thumbnail img,
.entry-content figure img {
  border-radius: 2px;
}

.loop-entry .entry-summary p {
  font-size: 0.95rem;
  color: var(--global-palette5);
  line-height: 1.68;
}

/* ==========================================================================
   8. Editorial components
   Small pieces that make the difference between "a website" and "a
   publication". Use these as block classes in the editor.
   ========================================================================== */

/* Eyebrow label — sits above a heading. Add "tc-eyebrow" as a block class. */
.tc-eyebrow {
  font-family: var(--tc-sans);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.17em;
  color: var(--global-palette1);
  margin-bottom: 1em;
}

/* Standfirst / deck — the line under an article headline. */
.tc-standfirst {
  font-family: var(--tc-sans);
  font-size: 1.16rem;
  line-height: 1.62;
  color: var(--global-palette5);
  max-width: 60ch;
}

/* Hairline divider */
.tc-rule {
  border: none;
  border-top: var(--tc-rule);
  margin: 3.5rem 0;
}

/* Pull quote */
.entry-content blockquote,
.wp-block-quote {
  border-left: 2px solid var(--global-palette1);
  padding-left: 1.6em;
  margin: 2.5em auto;
  font-family: var(--tc-serif);
  font-size: 1.5rem;
  line-height: 1.38;
  color: var(--global-palette3);
  font-style: normal;
}

.entry-content blockquote p:last-child { margin-bottom: 0; }

/* Affiliate disclosure strip — for the top of product articles */
.tc-disclosure {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--global-palette5);
  background-color: var(--global-palette7);
  border-left: 2px solid var(--global-palette6);
  padding: 0.9em 1.2em;
  margin: 0 auto 2.5em;
  max-width: var(--tc-measure);
}

/* Specification / comparison tables */
.entry-content table,
.wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
  margin: 2em auto;
}

.entry-content table th,
.wp-block-table th {
  font-family: var(--tc-sans);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--global-palette5);
  text-align: left;
  border-bottom: 1.5px solid var(--global-palette3);
  padding: 0.7em 0.9em;
}

.entry-content table td,
.wp-block-table td {
  border-bottom: var(--tc-rule);
  padding: 0.85em 0.9em;
  vertical-align: top;
}

/* ==========================================================================
   9. Footer
   ========================================================================== */

#colophon,
.site-footer-wrap {
  background-color: var(--global-palette8);
  border-top: var(--tc-rule);
  color: var(--global-palette5);
  font-size: 0.88rem;
}

.site-footer a {
  color: var(--global-palette5);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.site-footer a:hover {
  color: var(--global-palette3);
  border-bottom-color: var(--global-palette6);
}

/* ==========================================================================
   10. Spacing
   Editorial pages breathe more than the theme default.
   ========================================================================== */

.content-area { padding-top: 3.5rem; padding-bottom: 5rem; }

@media (max-width: 767px) {
  .content-area { padding-top: 2.25rem; padding-bottom: 3rem; }
  body { font-size: 1.02rem; }
  .entry-content > p:first-of-type { font-size: 1.1rem; }
}
