/*
Theme Name: Cape Town Coffee Co.
Theme URI: https://www.cpt.coffee
Author: Cape Town Coffee Co.
Author URI: https://www.cpt.coffee
Description: A clean, minimal white-and-black WordPress theme built for Cape Town Coffee Co., an events and mobile coffee catering business. Includes a full-logo splash homepage, a Services page, a Photos gallery page, and a Contact page.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cptcoffee
*/

/* -----------------------------------------------------------
   0. Reset / Base
----------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background: #ffffff;
    color: #14181f;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, "Segoe UI", sans-serif;
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: #14181f;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

a:hover,
a:focus {
    opacity: 0.6;
}

h1, h2, h3, h4 {
    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin: 0 0 0.6em;
    font-weight: 700;
}

ul {
    padding-left: 1.2em;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/* -----------------------------------------------------------
   1. Layout helpers
----------------------------------------------------------- */
.wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 28px;
}

.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex: 1 0 auto;
}

/* -----------------------------------------------------------
   2. Header / Navigation
----------------------------------------------------------- */
.site-header {
    border-bottom: 1px solid #14181f;
    padding: 22px 0;
    background: #ffffff;
}

.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 14px;
}

.site-branding img {
    height: 54px;
    width: auto;
}

.site-branding .site-title {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.2;
}

.site-branding .site-title a {
    color: #14181f;
}

.site-branding .site-tagline {
    display: block;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #6b7280;
    margin-top: 2px;
}

/* Primary nav */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 600;
    color: #14181f;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
    opacity: 1;
    border-bottom-color: #14181f;
}

.menu-toggle {
    display: none;
    background: none;
    border: 1px solid #14181f;
    padding: 8px 12px;
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
}

@media (max-width: 680px) {
    .menu-toggle {
        display: inline-block;
    }
    .main-navigation {
        width: 100%;
        display: none;
    }
    .main-navigation.is-open {
        display: block;
    }
    .main-navigation ul {
        flex-direction: column;
        gap: 14px;
        padding-top: 12px;
        border-top: 1px solid #e5e5e5;
        margin-top: 12px;
    }
}

/* -----------------------------------------------------------
   3. Splash / Front page (logo only)
----------------------------------------------------------- */
.splash-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 40px 24px;
}

.splash-inner {
    text-align: center;
    max-width: 520px;
}

.splash-inner img {
    width: 100%;
    max-width: 420px;
    margin: 0 auto 28px;
}

.splash-inner .splash-cta {
    margin-top: 22px;
    display: inline-block;
    border: 1px solid #14181f;
    padding: 12px 30px;
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 600;
}

.splash-inner .splash-cta:hover {
    background: #14181f;
    color: #ffffff;
    opacity: 1;
}

/* -----------------------------------------------------------
   4. Page header (used on interior pages)
----------------------------------------------------------- */
.page-hero {
    padding: 70px 0 40px;
    text-align: center;
    border-bottom: 1px solid #e5e5e5;
}

.page-hero h1 {
    font-size: 34px;
    margin-bottom: 10px;
}

.page-hero .page-subtitle {
    font-size: 15px;
    letter-spacing: 0.06em;
    color: #6b7280;
    text-transform: none;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

.page-content {
    padding: 50px 0 90px;
}

/* -----------------------------------------------------------
   5. Services page
----------------------------------------------------------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 34px;
    margin-top: 20px;
}

.service-card {
    border: 1px solid #14181f;
    padding: 34px 28px;
    text-align: left;
}

.service-card .service-icon {
    font-size: 28px;
    margin-bottom: 14px;
}

.service-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
}

.service-card p {
    font-size: 15px;
    color: #3f3f3f;
    margin: 0;
}

.services-note {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid #e5e5e5;
    text-align: center;
}

.services-note p {
    max-width: 640px;
    margin: 0 auto;
    color: #3f3f3f;
}

/* -----------------------------------------------------------
   6. Photos page
----------------------------------------------------------- */
.photo-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 10px;
}

.photo-gallery-grid figure {
    margin: 0;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #f4f4f4;
    border: 1px solid #e5e5e5;
}

.photo-gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.photo-gallery-grid a:hover img {
    transform: scale(1.04);
    opacity: 1;
}

.photo-gallery-empty {
    text-align: center;
    padding: 50px 20px;
    border: 1px dashed #cfcfcf;
    color: #6b7280;
    font-size: 15px;
}

/* WordPress default gallery + Gutenberg gallery block, restyled black/white */
.wp-block-gallery,
.gallery {
    margin-top: 10px !important;
}

.wp-block-image img,
.gallery img {
    border: 1px solid #e5e5e5;
}

/* -----------------------------------------------------------
   7. Contact page
----------------------------------------------------------- */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

@media (max-width: 780px) {
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

.contact-details h3 {
    font-size: 15px;
    margin-bottom: 8px;
}

.contact-details .contact-block {
    margin-bottom: 30px;
}

.contact-details p {
    margin: 0;
    color: #3f3f3f;
}

.contact-details a {
    border-bottom: 1px solid #14181f;
}

.contact-form label {
    display: block;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 6px;
}

.contact-form .form-row {
    margin-bottom: 22px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #14181f;
    background: #ffffff;
    font-family: inherit;
    font-size: 15px;
    color: #14181f;
}

.contact-form textarea {
    min-height: 140px;
    resize: vertical;
}

.contact-form button {
    background: #14181f;
    color: #ffffff;
    border: 1px solid #14181f;
    padding: 13px 34px;
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 600;
    cursor: pointer;
}

.contact-form button:hover {
    background: #ffffff;
    color: #14181f;
    opacity: 1;
}

.form-success {
    border: 1px solid #14181f;
    padding: 16px 18px;
    margin-bottom: 24px;
    font-size: 14px;
}

.form-error {
    border: 1px solid #b3261e;
    color: #b3261e;
    padding: 16px 18px;
    margin-bottom: 24px;
    font-size: 14px;
}

/* -----------------------------------------------------------
   8. Generic page / single content (fallback template)
----------------------------------------------------------- */
.entry-content {
    font-size: 16px;
}

.entry-content img {
    margin: 24px 0;
}

/* -----------------------------------------------------------
   9. Footer
----------------------------------------------------------- */
.site-footer {
    border-top: 1px solid #14181f;
    padding: 36px 0;
    text-align: center;
    background: #ffffff;
}

.site-footer .footer-logo {
    height: 34px;
    width: auto;
    margin: 0 auto 14px;
}

.site-footer .footer-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 22px;
    margin: 0 0 16px;
    padding: 0;
    flex-wrap: wrap;
}

.site-footer .footer-nav a {
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.site-footer .footer-meta {
    font-size: 12px;
    color: #6b7280;
    letter-spacing: 0.04em;
}

/* -----------------------------------------------------------
   10. Utility
----------------------------------------------------------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }

@media (max-width: 600px) {
    .page-hero h1 { font-size: 26px; }
    body { font-size: 16px; }
}
